Maintaining throughput of a stream processing framework while increasing processing load

ABSTRACT

The technology disclosed relates to maintaining throughput of a stream processing framework while increasing processing load. In particular, it relates to defining a container over at least one worker node that has a plurality workers, with one worker utilizing a whole core within a worker node, and queuing data from one or more incoming near real-time (NRT) data streams in multiple pipelines that run in the container and have connections to at least one common resource external to the container. It further relates to concurrently executing the pipelines at a number of workers as batches, and limiting simultaneous connections to the common resource to the number of workers by providing a shared connection to a set of batches running on a same worker regardless of the pipelines to which the batches in the set belong.

PRIORITY APPLICATION

This application is related to and claims the benefit of U.S.Provisional Patent Application 62/220,827, “MAINTAINING THROUGHPUT OF ASTREAM PROCESSING FRAMEWORK WHILE INCREASING PROCESSING LOAD” (Atty.Docket No. SALE 1136-1/1650PROV), filed on Sep. 18, 2015. The priorityprovisional application is hereby incorporated by reference for allpurposes.

RELATED APPLICATIONS

This application is related to U.S. patent application Ser. No.14/936,141, entitled “SIMPLIFIED ENTITY LIFECYCLE MANAGEMENT” filed onNov. 9, 2015 (Atty. Docket No. SALE 1130-3/1644US). The relatedapplication is hereby incorporated by reference for all purposes.

This application is related to U.S. patent application Ser. No.14/931,658, entitled “SIMPLIFIED ENTITY ENGAGEMENT AUTOMATION” filed onNov. 3, 2015 (Atty. Docket No. SALE 1131-3/1645US). The relatedapplication is hereby incorporated by reference for all purposes.

This application is related to U.S. patent application filedcontemporaneously entitled, “HANDLING MULTIPLE TASK SEQUENCES IN ASTREAM PROCESSING FRAMEWORK,” (Atty. Docket No. SALE 1133-2/1647US). Therelated application is hereby incorporated by reference for allpurposes.

This application is related to U.S. patent application filedcontemporaneously entitled, “PROVIDING STRONG ORDERING IN MULTI-STAGESTREAMING PROCESSING,” (Atty. Docket No. SALE 1134-2/1648US). Therelated application is hereby incorporated by reference for allpurposes.

This application is related to U.S. patent application filedcontemporaneously entitled, “MANAGING PROCESSING OF LONG TAIL TASKSEQUENCES IN A STREAM PROCESSING FRAMEWORK” (Atty. Docket No. SALE1137-2/1651US). The related application is hereby incorporated byreference for all purposes.

This application is related to US Provisional patent application filedcontemporaneously, entitled “SUB-SECOND RESPONSES TO COMPLEX ANALYTICALQUERIES USING COMBINATION OF BATCH AND STREAM PROCESSING” (Atty. DocketNo. SALE 1138-1/1652PROV). The related application is herebyincorporated by reference for all purposes.

FIELD OF THE TECHNOLOGY DISCLOSED

The technology disclosed relates generally to a processing framework forstream processing systems, and in particular to providing an improvedstream processing framework that uses a combination of concurrent andmultiplexed processing.

BACKGROUND

The subject matter discussed in this section should not be assumed to beprior art merely as a result of its mention in this section. Similarly,a problem mentioned in this section or associated with the subjectmatter provided as background should not be assumed to have beenpreviously recognized in the prior art. The subject matter in thissection merely represents different approaches, which in and ofthemselves may also correspond to implementations of the claimedtechnology.

The technology disclosed relates to maintaining throughput of a streamprocessing framework while increasing processing load. In particular, itrelates to defining a container over at least one worker node that has aplurality workers, with one worker utilizing a whole core within aworker node, and queuing data from one or more incoming near real-time(NRT) data streams in multiple pipelines that run in the container andhave connections to at least one common resource external to thecontainer. It further relates to concurrently executing the pipelines ata number of workers as batches, and limiting simultaneous connections tothe common resource to the number of workers by providing a sharedconnection to a set of batches running on a same worker regardless ofthe pipelines to which the batches in the set belong.

The technology disclosed reduces the amount of dedicated hardware andclients required to connect multiple pipelines in a container to commonresources. For example, if thousand pipelines are processed over hundredworker nodes in a container, then at least ten connections are needed tobe configured with relevant container resources such as a message bus(like Apache Kafka™), an output queue or sink (like Apache Kafka™), apersistence store (like Apache Cassandra™) and a global service registry(Zookeeper™). Thus, in total, for such a container, a thousandconnections need to be made to each of the different relevant resources.

The technology disclosed solves this technical problem by allowing themultiple pipelines in a container to connect to relevant resources usingcommon connections, thereby substantially reducing the number ofsimultaneous connections to relevant container resources.

For many analytic solutions, batch processing systems are not sufficientfor providing real-time results because of their loading and processingrequirements: it can take hours to run batch jobs. As a result,analytics on events can only be generated long after the events haveoccurred. In contrast, the shortcoming of streaming processing analyticssystems is that they do not always provide the level of accuracy andcompleteness that the batch processing systems provide. The technologydisclosed uses a combination of batch and streaming processing modes todeliver contextual responses to complex analytics queries withlow-latency on a real-time basis.

In today's world, we are dealing with huge data volumes, popularlyreferred to as “Big Data”. Web applications that serve and managemillions of Internet users, such as Facebook™, Instagram™, Twitter™,banking websites, or even online retail shops, such as Amazon.com™ oreBay™ are faced with the challenge of ingesting high volumes of data asfast as possible so that the end users can be provided with a real-timeexperience.

Another major contributor to Big Data is a concept and paradigm called“Internet of Things” (IoT). IoT is about a pervasive presence in theenvironment of a variety of things/objects that through wireless andwired connections are able to interact with each other and cooperatewith other things/objects to create new applications/services. Theseapplications/services are in areas likes smart cities (regions), smartcar and mobility, smart home and assisted living, smart industries,public safety, energy and environmental protection, agriculture andtourism.

In today's world, we are dealing with huge data volumes, popularlyreferred to as “Big Data”. Web applications that serve and managemillions of Internet users, such as Facebook™, Instagram™, Twitter™,banking websites, or even online retail shops, such as Amazon.com™ oreBay™ are faced with the challenge of ingesting high volumes of data asfast as possible so that the end users can be provided with a real-timeexperience.

Another major contributor to Big Data is a concept and paradigm called“Internet of Things” (IoT). IoT is about a pervasive presence in theenvironment of a variety of things/objects that through wireless andwired connections are able to interact with each other and cooperatewith other things/objects to create new applications/services. Theseapplications/services are in areas likes smart cities (regions), smartcar and mobility, smart home and assisted living, smart industries,public safety, energy and environmental protection, agriculture andtourism.

Currently, there is a need to make such IoT applications/services moreaccessible to non-experts. Till now, non-experts who have highlyvaluable non-technical domain knowledge have cheered from the sidelinesof the IoT ecosystem because of the IoT ecosystem's reliance ontech-heavy products that require substantial programming experience.Thus, it has become imperative to increase the non-experts' ability toindependently combine and harness big data computing and analyticswithout reliance on expensive technical consultants.

Stream processing is quickly becoming a crucial component of Big Dataprocessing solutions for enterprises, with many popular open-sourcestream processing systems available today, including Apache Storm™,Apache Spark™, Apache Samza™, Apache Flink™, and others. Many of thesestream processing solutions offer default schedulers that evenlydistribute processing tasks between the available computation resourcesusing a round-robin strategy. However, such a strategy is not costeffective because substantial computation time and resources are lostduring assignment and re-assignment of tasks to the correct sequence ofcomputation resources in the stream processing system, therebyintroducing significant latency in the system.

Also, an opportunity arises to provide systems and methods that usesimple and easily codable declarative language based solutions toexecute big data computing and analytics tasks.

Further, an opportunity arises to provide systems and methods that use acombination of concurrent and multiplexed processing schemes to adapt tothe varying computational requirements and availability in a streamprocessing system with little performance loss or added complexity.Increased revenue, higher user retention, improved user engagement andexperience may result.

SUMMARY

A simplified summary is provided herein to help enable a basic orgeneral understanding of various aspects of exemplary, non-limitingimplementations that follow in the more detailed description and theaccompanying drawings. This summary is not intended, however, as anextensive or exhaustive overview. Instead, the sole purpose of thissummary is to present some concepts related to some exemplarynon-limiting implementations in a simplified form as a prelude to themore detailed description of the various implementations that follow.

The technology disclosed relates to maintaining throughput of a streamprocessing framework while increasing processing load. In particular, itrelates to defining a container over at least one worker node that has aplurality of workers, with one worker utilizing a whole processor corewithin a worker node, and queuing data from one or more incoming nearreal-time (NRT) data streams in multiple pipelines that run in thecontainer and have connections to at least one common resource externalto the container. It further relates to concurrently executing thepipelines at a number of workers as batches, and limiting simultaneousconnections between the common resource and the workers by providing ashared connection to a set of batches running on a same workerregardless of the pipelines to which the batches in the set belong.

Other aspects and advantages of the technology disclosed can be seen onreview of the drawings, the detailed description and the claims, whichfollow.

BRIEF DESCRIPTION OF THE DRAWINGS

In the drawings, like reference characters generally refer to like partsthroughout the different views. Also, the drawings are not necessarilyto scale, with an emphasis instead generally being placed uponillustrating the principles of the technology disclosed. In thefollowing description, various implementations of the technologydisclosed are described with reference to the following drawings, inwhich:

FIG. 1 depicts an exemplary IoT platform.

FIG. 2 illustrates a stream processing framework used in an IoT platformsimilar to the example IoT platform shown in FIG. 1, according to oneimplementation of the technology disclosed.

FIG. 3 is one implementation of a worker node in a worker tier thatincludes a plurality of physical threads utilizing a whole processorcore of the worker node.

FIG. 4A and FIG. 4B depict one implementation of concurrently processingbatches in a pipeline when a count of available physical threads equalsor exceeds a set number of logically parallel threads.

FIG. 5A, FIG. 5B and FIG. 5C show one implementation of multiplexingbatches in a pipeline sequentially when there are fewer availablephysical threads than a set number of logically parallel threads.

FIG. 6A is one implementation of multi-stage processing of a batch.

FIG. 6B depicts one implementation of maintaining strong orderingbetween batch-units of a batch during multi-stage processing of thebatch shown in FIG. 6A.

FIG. 7A illustrates one implementation of queuing data from a pluralityof NRT data streams as batches in multiple pipelines using agrid-coordinator that controls dispatch of the batches to physicalthreads running in worker nodes of a worker tier.

FIG. 7B shows one implementation of executing batches of a highestpriority pipeline before other pipelines with medium and low priorities.

FIG. 7C is one implementation of executing batches of a medium-prioritypipeline after a highest priority pipeline but before a low-prioritypipeline.

FIG. 7D depicts one implementation of executing batches of a lowestpriority pipeline after other pipelines with highest and mediumpriorities.

FIG. 8A shows one implementation of tracking NRT data streams using afilter server that detects data belonging to a long tail and surgingtask sequences based unique task sequence identifiers (IDs).

FIG. 8B is one implementation of assigning a long tail task sequence toa low-priority pipeline and assigning a surging task sequence to ahigh-priority pipeline.

FIG. 8C depicts one implementation of migrating a recently detected longtail task sequence to a lower-priority pipeline.

FIG. 8D illustrates one implementation of migrating a recently detectedsurging task sequence to a higher priority pipeline.

FIG. 9 is a block diagram of an exemplary multi-tenant system suitablefor integration with the IoT platform of FIG. 1 in accordance with oneor more implementations of the technology disclosed.

FIG. 10 shows one implementation of concurrent processing of multiplepipelines in a container using common connections to reduce the numberof simultaneous connections to the common resources used by thecontainer.

FIG. 11 is a representative method of maintaining throughput of a streamprocessing framework while increasing processing load.

DETAILED DESCRIPTION

The following detailed description is made with reference to thefigures. Sample implementations are described to illustrate thetechnology disclosed, not to limit its scope, which is defined by theclaims. Those of ordinary skill in the art will recognize a variety ofequivalent variations on the description that follows.

The discussion is organized as follows. First, an explanation ofterminology that will be used throughout the discussion is provided,followed by an introduction describing some of the technical problemsaddressed and technical solutions offered by various implementations.Then, a high-level description of some implementations will be discussedat an architectural level. Also, a state machine implementing an entitymanagement workflow is described. Further, some user interface viewsused by some implementations will be presented. Next, more focusedactions for implementing the system, together with data entry models,transitive triggers and condition definitions are discussed. Lastly,some particular implementations are discussed.

TERMINOLOGY

Task Sequence: A “task sequence” is defined as a designed effort orprocess, usually implemented by an experience operator (e.g. company,organization), to enable effective user management and resourceprovisioning, application life cycle management, workflowimplementation, user engagement, traffic monitoring, activity tracking,provisioning for application modeling, etc. A task sequence involvescollection of data from a large number of entities and subsequentprocessing of the collected data. Data for a task sequence is receivedas continuous near real-time (NRT) data streams, which are processed togenerate real-time analytics. In one illustrative example, a tasksequence is a ride delivery workflow set up by a cab sharing companylike Uber™. The ride delivery workflow can involve multiple stages, suchas (1) receiving a cab request from an end-user, (2) identifying therequested destination area, (3) discovering available Uber cab driversin the destination area, (4) transmitting the cab request with contactinformation of the end-user to the available Uber cab drivers, (5)receiving ratification from at least one willing Uber cab driver, (6)notifying the end-user of the imminent cab arrival with cab vehicleinformation and (7) receiving confirmation from the end-user regardingaccepting the cab delivery. Each of these seven stages involves exchangeof a substantial amount of data, which gets processed in real-time togenerate real-time analytics. An augmentation of millions of suchreal-time user-requests and real-time responses applied over extendedperiods of time is defined as a task sequence. Other examples of a tasksequence could be—receiving millions of e-mails every day for an entityoperator like Microsoft™ and processing them in real-time to generateclick metrics that identify which users clicked on certain web linksincluded in the e-mails, receiving millions of requests from users ofUber™ to redeem ride discount coupons distributed by Uber™, andreceiving millions of tweets about a music concert. This applicationinterchangeably refers to a “task sequence” as an “entity experienceoperation”, and vice-versa.

Long Tail Task Sequence: A “long tail task sequence” is a task sequencethat consumes dedicated computing resources which, when properly sizedfor the beginning of the task sequence, are excessive as the tasksequence tails off. An example of a long tail task sequence is thegiving of fantasy football game tokens during a Super Bowl by a gamingcompany. Once the demand for fantasy football tapers after the SuperBowl, the use of the game tokens decreases. As a result, the number ofgame token redemption requests electronically received also decreases.However, the gaming company continues to honor the unused tokens thatare redeemed slowly over a long period after the Super Bowl. Thisextended lull can be characterized by a long tail task sequence becauseit does not require as many computation resources as does the surgeduring the Super Bowl, and thus token handling can be completed usingfewer computational resources than initially allotted.

Container: A stream processing framework is built using an API(application programming interface) and deployed as a cluster called a“container”. The container takes care of the distribution of tasks/jobswithin a given infrastructure and the API is designed to handle messagepassing, task/job discovery and fault-tolerance. This applicationinterchangeably refers to a “container” as a “stream container”, andvice-versa. This application interchangeably refers to a “container” ora collection of containers as a “grid”, and vice-versa.

Worker Node: A container groups a set of physical machines called“worker nodes”.

Physical Thread: Once deployed, a container operates over of a set ofso-called “physical threads”. A physical thread utilizes a processorcore of a worker node and runs inside a set of code processes (e.g.,Java processes) that are distributed over the worker node, no more thanone physical thread per core. A physical thread also carries out thelogic of a set of tasks/jobs for different elements and components(e.g., emitters and transformers) of a container.

Emitter: Data enters a container through a so-called “emitter”. Emittersare event tuple sources for a container and are responsible for gettingthe event tuples into the container. In one implementation, emitterspull event tuples from input queues. In some implementations, emittersinclude user-specified conversion functions, such that they consume bytestrings from an input queue and forward them as tuples to downstreamtransformers. An emitter retrieves one or more tasks/jobs to be executedby one or more physical threads of a worker node.

Transformers: A transformer is a computation unit of a container thatprocesses the incoming event tuples in the container and passes them tothe next set of transformers downstream in the container. A transformerpasses one or more tasks/jobs downstream, typically to be furthertransformed one or more physical threads of a worker node.

Pipeline: A pipeline is defined as a sequence of operations performed ona group of event tuples from one or more NRT data streams. In oneimplementation, the grouping is on a tuple-by-type basis. In anotherimplementation, the grouping is on batch-by-batch basis. In someimplementations, each pipeline is identified by a unique pipelineidentifier (ID). In one implementation, multiple NRT data streams cansource data to one or more pipelines. In another implementation, a NRTdata stream is queued to a task sequence in a single pipeline, which inturn is processed over a single container.

Batch: A batch is defined as an assemblage of event tuples partitionedon a time-slice basis and/or a batch-size basis and sequentially queuedin a pipeline. A time-slice based definition includes partitioning atleast one incoming NRT data stream by its most recently received portionwithin a time window (e.g., one batch keeps the event tuples from thelast one second). A batch-size based definition includes partitioning atleast one incoming NRT data stream by a most recently received portionlimited or restricted to or constrained by a data size (e.g., one batchincludes 10 MB of most recently received event tuples). In otherimplementations, a combination of time-size basis and batch-size basisis used to define batches. In some other implementations, each batch ina pipeline is identified by a unique batch identifier (ID).

Batch-Unit: A micro unit of work of a batch is called a batch-unit. Abatch is subdivided into a set of batch units. In some implementations,different batch-units of a batch are processed in different stages atdifferent computation units of a container, a concept referred to as“multi-stage processing”. In some other implementations, a batch istransactional boundary of stream processing within a container, such atransaction is considered to be complete when a batch is completelyprocessed and is considered incomplete when a batch overruns a time-outwithout all of its batch-units being processed.

Coordinator: The coordination between a pipeline that includes data tobe processed and the worker nodes that process the data is carried outthrough a software component of the container called a “coordinator”,which is in charge of distribution of tasks to the physical threads in aworker node. This application interchangeably refers to a “coordinator”as a “grid-coordinator”, and vice-versa.

Scheduler: A scheduler tracks one or more pipelines in a container andcommunicates with the coordinator to schedule execution of batches inthe container. In some implementations, a scheduler maintains thecurrent batch stage information during multi-stage processing of a batchand communicates this information along with identification of the batchand pipeline to the coordinator. This application interchangeably refersto a “scheduler” as a “grid-scheduler”, and vice-versa.

Parallelism: A container runs a user-specified number of logicallyparallel threads, fixed by a developer of a container. A “logicallyparallel threads” value specifies how many threads are to besimultaneously utilized by the container during processing of batches ina pipeline.

Near Real-Time Data Stream: A near real-time (NRT) data stream isdefined as an unbounded sequence of event tuples that is processed inparallel and distributed among multiple worker nodes. In oneimplementation, a NRT data stream is defined as a collection ofreal-time events for a task sequence or a particular stage of a tasksequence. In another implementation, a NRT data stream is defined as acollection of events that are registered as they are generated by anentity. In one implementation, a NRT data stream is an unboundedsequence of data tuples. In some implementations, a NRT data stream hasan emission rate of one million events or tuples per second.

Stream Processing Framework: A “stream processing framework” is definedas a real-time stream processing system that represents an entirestreaming application as a graph of computation. In someimplementations, the stream processing framework processes NRT datastreams for one or more task sequences to generate real-time analytics.This application interchangeably refers to a “stream processingframework” as a “stream processing system”, and vice-versa.

Internet of Things Platform: The “Internet of Things (IoT) platform”disclosed herein is defined as an integrated environment that collectsand processes a high volume of data from a plurality of entities inreal-time or near real-time, often with low latency. In some instances,processing logic can be applied to the data to generate real-time ornear real-time analytics. In one implementation, an IoT platform isdefined as an integrated framework that utilizes computation over acombination of stream mode and batch mode to periodically generateaggregates using batch and offline analytics and substitute results fromreal-time data streams to generate real-time analytics by performingcomputational tasks like data mining, machine learning, statisticalprocessing, predictive analytics, time series analysis, rule basedprocessing, complex event processing, pattern detection, correlation andmore. In one implementation, the IoT platform offers a high throughputof the order of processing one million tuples per second per node. Inanother implementation, the IoT platform offers insights to end-users inthe form of rich visualization, using GUI and/or API based tools likestandard graphs, bars, charts and overlaid infographics.

Event: An event is any identifiable unit of data that conveysinformation about an occurrence. In one implementation, an event canalso provide information concerning an entity. An event can have threeaspects: a timestamp indicating when the event occurred; a set ofdimensions indicating various attributes about the event; and a set ofmetrics related to the event. Events can be user-generated events suchas keystrokes and mouse clicks, among a wide variety of otherpossibilities. System-generated events include statistics (e.g.latency/number of bytes, etc.), program loading and errors, also among awide variety of other possibilities. In one implementation, eventsinclude network flow variables, device information, user and groupinformation, information on an application (e.g., resource condition,variables and custom triggered events). An event typically representssome message, token, count, pattern, value, or marker that can berecognized within a NRT data stream, such as network traffic, specificerror conditions or signals, thresholds crossed, counts accumulated, andso on. A typical user interaction with an application like Pardot™processes a sequence of events that occur in the context of a session.The main events of note are (a) login—provide user credentials to hostedservice to authenticate the user; (b) application transactions—execute aset of application level transactions, e.g. add leads or define newoperations; and (c) log-out—this event terminates the session with theserver. In some implementations, deep packet inspection logic tracks rawevent data to identify events and stores them in an event repository.This application, in some implementations, interchangeably refers to“events” as “data”, and vice-versa. Other examples of events generatedby or about various entities include telemetry from a wearable sensor,data from a smart watch, data and/or metadata generated by a user usinga feature of an application (such as Microsoft Word™), trip or journeydata generated from a GPS used by a driver starting or completing atrip, data generated by a vehicle reporting speed or locationinformation, data generated by a medical device reporting a sensorreading, etc.

Entity: An entity is defined as a thing or object that interacts andcommunicates with other things or objects and with the environment byexchanging data and information sensed about the environment whilereacting to real/physical world events, to provide services forinformation transfer, analytics, applications and communications.Examples of entities include humans, online social networks,wireless/wired sensors, smart phones, smart watches, application PCs,PCs, laptops, tablets, IP telephones, servers, application servers,cameras, scanners, printers, near-field communication devices like RFIDtags and RFID readers, vehicles, biomedical equipment, and others. Insome implementations, the singular “entity” and the plural “entities”are used interchangeably in this application for clarity. In thisapplication, in some implementations, “entities” are “data sources”,“users”, and other actors.

Online Social Network: An “online social network” is defined as anycombination of software, protocols and/or hardware configured to allow acommunity of users or individuals and/or other entities to shareinformation, resources and the like via a computer network (such as theInternet). An online social network uses a platform like a website, blogor forum to foster interaction, engagement and information sharing. Someexamples of an online social network include Facebook™, Twitter™,YouTube™, Flickr™, Picasa™, Digg™, RSS™, Blogs™ Reddit™, Linkedln™,Wikipedia™, Pinterest™, Google Plus+™, MySpace™, Bitly™ and the like.This application, in some implementations, interchangeably refers to“online social network” as “social network”, “social media site”,“social networking service”, “social media source” and “socialnetworking entity”, and vice-versa.

Application Programming Interface: An “application programming interface(API)” is defined as a packaged collection of code libraries, methodsand fields that belong to a set of classes, including its interfacetypes. The API defines the way that developers and programmers can usethe classes for their own software development, just by importing therelevant classes and writing statements that instantiate the classes andcall their methods and fields. In another implementation, an API is asource code based specification intended to be used as an interface bysoftware components to communicate with each other. An API can includespecifications for routines, data structures, object classes andvariables. Basically, an API provides an interface for developers andprogrammers to access the underlying platform capabilities and featuresof online social networks. For example, Twitter's Search API involvespolling Twitter's data through a search or username. Twitter's SearchAPI gives developers and programmers access to data set that alreadyexists from tweets which have occurred. Through the Search API,developers and programmers request tweets that match search criteria.The criteria can be keywords, usernames, locations, named places, etc.In another example, Twitter's Streaming API is a push of data as tweetsare posted in near real-time. With Twitter's Streaming API, developersand programmers register a set of criteria (e.g., keywords, usernames,locations, named places, etc.) and as tweets match the criteria, theyare pushed directly to the developers and programmers. In yet anotherexample, Twitter Firehose pushes data to developers and programmers innear real-time and guarantees delivery of all the tweets that match theset criteria.

Application: An application refers to a network hosted service accessedvia a uniform resource locator (URL). Examples include software as aservice (SaaS) offerings, platform as a service (PaaS) offerings, andinfrastructure as a service (IaaS) offerings, as well as internalenterprise applications. Examples of applications include Salesforce1Platform™, Sales cloud™ Data.com™, Service Cloud™, Desk.com™, MarketingCloud™, Pardot™, Wave Analytics™ Box.net™, Dropbox™, Google Apps™,Amazon AWS™, Microsoft Office 365™, Workday™ Oracle on Demand™, Taleo™,Yammer™ and Concur™. In one implementation, an application offersinsights to end-users in the form of rich visualization, using GUIand/or API based tools like standard graphs, bars, charts and overlaidinfographics.

Identification: As used herein, the “identification” of an item ofinformation does not necessarily require the direct specification ofthat item of information. Information can be “identified” in a field bysimply referring to the actual information through one or more layers ofindirection, or by identifying one or more items of differentinformation which are together sufficient to determine the actual itemof information. In addition, the term “specify” is used herein to meanthe same as “identify.”

Introduction

The technology disclosed reduces the amount of dedicated hardware andclients required to connect multiple pipelines in a container to commonresources. For example, if a thousand pipelines are processed over ahundred worker nodes in a container, then at least ten connections needto be configured with relevant container resources such as a message bus(like Apache Kafka™), an output queue or sink (like Apache Kafka™), apersistence store (like Apache Cassandra™) and a global service registry(Zookeeper™). Thus, in total, for such a container, a thousandconnections need to be made to each of the different relevant resources.

The technology disclosed solves this technical problem by allowing themultiple pipelines in a container to connect to relevant resources usingcommon connections, thereby substantially reducing the number ofsimultaneous connections to relevant container resources.

The technology disclosed relates to maintaining throughput of a streamprocessing framework while increasing processing load. In particular, itrelates to defining a container over at least one worker node that has aplurality workers, with one worker utilizing a whole core within aworker node, and queuing data from one or more incoming near real-time(NRT) data streams in multiple pipelines that run in the container andhave connections to at least one common resource external to thecontainer. It further relates to concurrently executing the pipelines ata number of workers as batches, and limiting simultaneous connectionsbetween the common resource and the workers by providing a sharedconnection used to process a set of batches running on a same workerregardless of the pipelines to which the batches in the set belong.

Our world today is composed of the is and Os that make up the binarycode created by the streams of data flowing through every sector of theglobal economy. How much data is that?

According to IBM,1 2.5 exabytes of data were created every day in 2012.That is 2.5 billion gigabytes of data in a single day. Facebook alonewas responsible for 500,000 gigabytes a day in the same year. Theimportance of data is becoming so big, even the U.S. Government haslaunched an initiative, Data.gov, to help access and analyze it. Thegood news is that data processing and storage costs have decreased by afactor of more than 1,000 over the past decade. But once that data isstored, it is difficult to retrieve and use.

According to The Boston Consulting Group, one third of all bank data isnever used. A big part of this is the fact that 75% of the data wegenerate is unstructured. It is randomly organized, difficult to index,and therefore difficult to retrieve.

Where is all of this data coming from? An obvious source is the datathat is being generated from legacy systems of record. It is data fromcloud software as witnessed by the rapid adoption of Software as aService (SaaS) as the new business application model.

It is data being created every second from mobile phones, devices, andsensors that are being placed on just about everything that can bemonitored in the physical world. And social media represents the largestdata streams, which are being created in astronomical volumes.

Forget about texts and think of all the photos and videos being uploadedvia smartphones to popular services like YouTube, Facebook, Instagram,and Twitter.

The smartphone is currently the major enabler of this data tsunami. PCsand feature phones (mobile phones that are not smartphones) are both indecline while smartphones are growing in the opposite direction, even inregions such as sub-Saharan Africa. And where there is a smartphone,there is an application for practically every human endeavor.

Applications are the smartphone control point for all of the real-timedata streams being created by our fingers, the camera, the motionsensor, GPS antenna, Bluetooth antenna, and gyroscope. Smartphonemanufacturers continue to jam more sensors and capabilities into thesedevices while developers continue to build applications that delight usall.

According to The Economist, 50% of the adult population in 2015 owns asmartphone. That will grow to 80% in 2020. But as impressive assmartphones are, the biggest ripple is just forming. To use a termcoined by Andreessen Horowitz, it is the “sensorification” of thephysical world. The combination of cheap, connected, miniaturizedcomputers and sensors will create a world of smart, connected productsand industrial equipment.

This new technology category is often called the “Internet of Things”(IoT). General Electric goes one step further, with the term “industrialinternet”, to include things like jet engines, locomotives, and Millmachines.

The Internet of Things represents a major and transformational wave ofIT innovation. The Harvard Business Review calls this the third wave ofIT-driven competition, with the first two waves brought by mainframesand minicomputers, and the rise of the Internet. Needless to say,harnessing and analyzing these data streams will represent the biggestchallenge IT and businesses will face over the next decade.

The apt term used to describe this massive volume of data is “Big Data.For Big Data, traditional data storage technology is inadequate to dealwith these large, high-speed volumes. And the challenges don not endthere.

Enterprises will also need to figure out how to not only capture thisdata, but how to search, analyze, and visualize it as well as connect itwith their business and customer data. The ultimate goal is the abilityto perform predictive analytics and real-time intelligentdecision-making. This is going to require an IT transformation fromsystems of record to systems of intelligence.

Before the advent of big data, the concept of business intelligence (BI)had already become a commonly used phrase back in the 1990s. A number ofnewly formed BI software vendors also entered the market at that time.

BI provided the methods and tools required for the transformation ofdata into meaningful and useful information for the business. Thefunctions of BI during this period were fairly basic, namely, to collectand organize the data and visualize it in a presentable way.

Innovations continued and the introduction of data warehousesdrastically reduced the time it took to access enterprise data fromsystems of record. Despite these innovations, a core challenge remains.Setting up these data warehouses requires deep expertise and using BItools requires significant training.

The mere mortals in the line of business still cannot use these tools inan accessible way. Most BI tools are pretty good at getting answers whenyou know ahead of time the questions you are asking. Sometimes yousimply do not know what questions to ask. In short, these tools do notenable business users to obtain the insights when, how, and where theyneed them.

Fortunately, this is all changing. For the first time, data analyticstools are being built that are entirely designed and run in the cloud.There is no need for IT to provision hardware or install and configurethe data platform. Performing all the associated integration and schemadevelopment has gone from months to days. This newfound agility hasallowed innovation in technology to eliminate the traditional two-stepservice bureau model where every request from the line of businessrequired It is involvement.

These innovations are paving the way for a democratization of data sothat business users can not only get access to data but also participatein its analysis. This means a self-service model with direct access toanswers without the need for analysts, data scientists, or IT. Businessusers can find and share answers almost instantly. There is no hardrequirement of needing to know ahead of time what questions to ask ofthe data. Business users can quickly bang out questions that allow themto explore and gain insights into the data sets.

Furthermore, this democratization is powered by mobile. Using theirsmartphone, tablets, or wearables, workers can now gain access to dataand answers to pressing business questions whenever and wherever theyare. The democratization of data has become a necessary phase in thejourney toward building systems of intelligence.

While the fruits of data democratization are plenty, the process itselfmostly deals with empowering business users with access to and analysisof data from legacy systems of record and cloud-based businessapplications. At best, some of these new BI tools can provide nearreal-time access and analysis of data. But they are not engineered forcapturing and analyzing actual real-time streams of data emanating fromsmartphones, wearables, and the coming explosion of sensors in thephysical world.

Real-time data streams deliver information that is quite different fromthe backward-looking, historical data most BI tools and platformsharness. Real-time data is perishable. That means it not only needs tobe detected, it needs to be acted upon. The concept of “time to insight”emerges as one of the key performance indicators for systems ofintelligence. These insights are going to require a whole new of levelpackaging and consumption. The information needs to be delivered incontext, at the right time, and in a way that cuts through the cacophonyof data we are exposed to in our daily work lives.

Systems of intelligence require knowing what to do with the datainsights and how they should be delivered to the appropriate workersbased on their job function and role inside the organization. Thesesystems are every bit as democratic as modern BI tools in that they areeasy to configure and get up and running. They are also designed to dealwith the daily deluge of data we are confronted with every day at work.Consumer applications such as social media, traffic, and newsaggregating applications help us more intelligently deal with the thingsthat matter to us most.

The bar for applications connected to our systems of intelligence is ashigh as for consumer applications. This means one click installation, alovely and simple user interface, and accessibility via the mobiledevice of your choosing. The harnessing and analysis of real-time datastreams begins to open up not only action in real time, but the abilityto anticipate what is going to happen. This has traditionally been therealm of data scientists who handle everything from statistics andcomputational modeling to visualization and reporting. Models created bydata scientists mostly look at past historical trends and use the datato predict patterns and future trends. Trying to build computationalmodels that look at large volumes of real-time data streams presents asignificant human resource challenge for enterprises.

According to McKinsey Global Institute, by 2018, the United States alonecould face a shortage of 140,000 to 190,000 people with deep analyticalskills as well as a shortage of 1.5 million managers and analysts withthe know-how to use the analysis of big data to make effectivedecisions.

Few companies have the data scientists to both analyze real-time bigdata streams and do something with it. Many organizations simply cannotfill existing open jobs with qualified individuals. Nor willuniversities prepare enough data scientists to meet the demand in thecoming years. But let's say you get your data scientists in place toanalyze and structure the data. What next? How do you translate thisinto something actionable? How do you train your line managers anddirectors to make sense of the analysis in order to make the rightdecisions?

While systems of intelligence will not be replacing data scientistsanytime soon, these systems will go a long way toward alleviating theneed to hire a huge staff of data scientists. Systems of intelligenceharness and scale the collective wisdom, expertise, and gained insightsof the organization such that intelligent decision-making becomes thesum of all these. The collective intelligence can be expressed likerules in a rules engine. These are powerful tools that allow businessusers to take this collective intelligence and compose simple, logicalbusiness rules that evaluate and analyze real-time data streams toproduce intelligent decisions.

Data science includes the process of formulating a quantitative questionthat can be answered with data, collecting and cleaning the data,analyzing the data, and communicating the answer to the question to arelevant audience.

Most of the initial fruits harvested by enterprises from their systemsof intelligence will be of the low-hanging variety, namely, valueobtained from the expression of simple business rules described above.But as organizations gain greater insights from their systems ofintelligence and more devices and sensors become part of the equation,the role of algorithms and machine learning will play a larger part inintelligent decision-making.

Enterprises will increasingly turn to artificial intelligence as theywill never be able to hire enough business analysts and data scientiststo sift through all the data. Credit card fraud detection is a greatexample and it is becoming quite sophisticated.

Artificial intelligence does not totally eliminate the need for atrained fraud expert, but it drastically reduces the number ofsuspicious cases that require human investigation.

There will be many considerations to explore as organizations spin uptheir big data efforts. It is going to require the right people, theright tools, and the right methods. The technology that is comingtogether today is essentially unbounded in the sources and magnitudes ofthe data sets. It is ready to handle ad hoc questions to whatever depthyou care to go.

The next step beyond this are the systems of intelligence that start totell customers what questions they need to be asking. Getting there willrequire a blueprint for systems of intelligence.

The source of data streams are the signals emanating in real-time frommobile devices such as smartphones and consumer wearables like theFitbit and Apple Watch. The control point for these signals is theapplication.

The application is what puts context behind the raw data that getscreated by human inputs and the sensors embedded in these devices.

According to Wikipedia, a sensor is a transducer whose purpose is tosense or detect some characteristic of its environs. It detects eventsor changes in quantities and provides a corresponding output, generallyas an electrical or optical signal.

Tying all of this together is the digital plumbing, or applicationprogramming interfaces (APIs). Along every critical element of the datastream flow represented in this schematic, APIs will enable this end toend transport of high speed and high volume data in the system. Althoughthe term, API, may not be in the common vernacular outside of IT, itwill be, much in the same way that terms of art to describe the web andinternet are common language in business communication today.

The major gushers of data streams will be the connected consumerproducts and industrial equipment and machines. These real-time signalswill emanate from product sensors inside our automobiles, inside ourhomes, on our valuables, our security systems, and anywhere in ourphysical environment that matters.

Signals from the industrial internet will emanate from sensors on anypiece of equipment or machine that requires monitoring, maintenance andrepair. Anything than can be digitally monitored with sensors in thephysical environment will be. Systems of intelligence must be able toidentify these signals and harness them.

In order to capture the high-volume and high-speed data signals, a“digital watchdog” is needed to monitor these signal inputs. If anythingsignificant happens with these digital signals, an event is registered.A very simple example of an event is when a temperature sensor goes offin your automobile to warn you of freezing conditions outside.

Systems of intelligence will require the technology to ingest andmonitor these data streams. The events created by the digital signalsget broadcasted via messages and moved through the system so that thedigestion process can proceed as planned. This is where filters canbegin their job of further analyzing these data streams. For the systemto function properly, it must be able to handle growing volumes andincreased speeds of data flow and must not be lost if there is abreakdown or crash in that system.

Once data is captured and processed, it moves along into the digestionphase. This is where some of the magic starts to happen. This includesthe monitoring and analytical processing of real-time data streams. Oncethe data is analyzed and processed, it needs to be put somewhere.

The data streams flowing in are not suitable for traditional databasestorage such as relational databases using structured query language.This requires specialized technology that can handle and store verylarge data sets, an essential element of systems of intelligence.

Another key component of this system is the ability to apply filters inthe form of business rules that get applied to the analysis of the datastreams. This will begin the process of eliminating human errors byexpressing the collective wisdom and expert knowledge of theorganization directly into the system. Artificial intelligence in theform of machine learning and algorithms can also be applied to thesedata streams for further analysis.

Enterprise data is comprised of the systems of record and systems ofengagement that represent the mainstream of enterprise IT today. As ITmigrated from mainframes and minicomputers to PCs and the Internet,systems of record have largely been about moving what were paper andmanual processes into the digital era. Systems of record have been aboutautomating everyday activities, capturing of their information byproducts, and reporting what are essentially historical documents

Systems of engagement are fundamentally different from systems of recordin that they focus on the social nature of conversations andinteractions with customers, partners and employees. Social media andthe consumerization of IT shape how these conversations occur and acrosswhat channels. Instead of digital artifacts that are document based,systems of engagement add the elements of time, context, and place.Systems of record do not go away; it is just that enterprises need toembrace next-generation communication and collaboration with systems ofengagement.

Systems of engagement and systems of record will be essential elementsin providing context to the data streams, filtering, and analysis. Youcannot make sense of the data streams and outputs if you do not have thefull picture of the customer, the partner, the employee. These systemswill be essential to illuminating the analytical insights andintelligent decisions driven by systems of intelligence.

After ingesting, digesting, and applying enterprise context to the datastreams, the intelligent outputs are produced and delivered in the rightform, at the right time, and to the right channel. The first twochannels are dashboards and insights. Dashboards drive visualization andcontext of what is and what has happened so that humans can explore andtake actions like launching new company initiatives, tweaking existingmarketing programs or refining the rules based on intelligentdecision-making. Insights rely more on delivering real-timedecision-making. It is a key difference between dashboards andanalytical insights. Expressing the collective knowledge and expertiseof the organization through business rules goes a long way towardeliminating bad decisions that are easily avoidable. As signals increaseand data streams flow into systems of intelligence, data scientists willbe able to better apply their methods and models to create machinelearning algorithms that deliver intelligent decisions in a predictivemanner.

Moving along to the final phase of our data streams journey, theenterprise can now begin to apply the fruits of the intelligent outputsto commence the transformation of the business. Our central premise isthat behind every application, device, connected product, and sensor isa customer. The role of IoT platform disclosed herein is to connect yourdevice data to the user success platform where you can engage customersthrough sales, customer service, marketing, communities, applicationsand analytics.

The technology disclosed improves existing streaming processing systemsby providing the ability to both scale up and scale down resourceswithin an infrastructure of a stream processing system. In addition, thetechnology disclosed leverages common dependencies between tasksequences running in a container to reduce the strain on sharedresources by eliminating dedicated per-pipeline hardware. Furthermore,the technology disclosed introduces natural elasticity to streamprocessing systems by minimizing the impact of small workloads on thesystems.

Apache Storm™, Apache Trident™, Apache Spark™, Apache Samza™, ApacheFlink™, etc. and most existing stream processing systems haveclassically focused exclusively on scaling up and scaling out ofcomputational resources in a quest for more performance. These systemsdo not typically perform well in a constrained resource environment suchas a small two-to-three machine cluster. Spark for example simply startscrashing once its in-memory grid is exhausted and also requires aminimum of one dedicated core per consumed Kafka partition. Running afew hundred simultaneous consumers in these systems requires potentiallyhundreds of dedicated cores. Storm with a two-to-three machine clusterruns at most perhaps twelve task sequences before requiring addition ofmore machines. This really makes these platforms appropriate only forlarge scale data processing that can justify the dedicated hardwarerequired (which is what they are designed to serve).

For smaller, trivial workloads or data patterns that have wild variancein their load over time, these platforms are extremely expensive due tothe minimum cost of hardware associated with a single “job”. What thismeans to a user is that they would typically need to decide whether ajob is “big enough” to justify porting it to something like Storm orSpark.

The technology disclosed particularly singles out long tail tasksequences that may initially have heavy activity but may need to remainactive for months waiting for perhaps dozens of messages a day. In thiscase, a big-data platform is needed for the initial activity and afterthe initial early load, the dedicated hardware would have historicallybeen wasted because it mostly was doing nothing. In Storm, no matter howtrivial the workload, if there are a thousand topologies, at least 1000workers are needed to run them, which equates to roughly 250 machineinstances, if four workers are being run per machine. The technologydisclosed allows for running one topology on a thousand machines or athousand topologies on one machine.

The primary benefits of the technical solution include allowing users torun an arbitrary amount of work on a fixed hardware budget and allowingusers to utilize the same environment, infrastructure and tools for bothsmall and large jobs.

The technology disclosed also leverages common dependencies across tasksequences. A job can always run in a dedicated container, which gives itfull use of all available resources and excellent isolation from otherprocesses. When jobs are multiplexed within the same container, theylose this isolation but gain locality which carries other benefits. Forexample, a typical application server shares a connection pool acrossall the applications hosted therein. The technology disclosed cangreatly reduce the strain on shared resources such as databases andmessage buses like Kafka™, persistence stores like Cassandra™ and globalservice registry like ZooKeeper™. In the technology disclosed,connections to Kafka™ Cassandra™ and ZooKeeper™ are all shared acrosshosted pipelines, thereby greatly reducing the potential load on theseservices. In some cases, the technology disclosed can eliminatededicated per-pipeline hardware by leveraging shared local caches ofresources. For instance, dozens of pipelines can read from the sameKafka topic without the need to make a call to Kafka for every pipeline.

Large systems hosting multiple workloads tend to be more naturallyelastic than dedicated systems. For example, threads doing small amountsof work introduce only small delays in busier threads because they onlyborrow shared resources for exactly the amount of time they are needed.Dedicated systems instead depend on monitoring and dynamic allocation ofresources, ideally adding and removing servers as workloads change. Thisis complicated to implement and plan for with an accurate budget. Thetechnology disclosed adapts a stream processing system to minimize theimpact of small workloads, thereby making the system more naturallyelastic and more gracefully changeable as workloads change. An exampleincludes two tasks sequences, one for the U.S. and one for Europe. Thesetwo task sequences receive the bulk of their loads at opposite times ofday. The technology disclosed applies most of the allocated resources(e.g. ninety percent) to the tasks sequence with actual load, without acomplex system of adding boxes for the time from 12 am to 4 am on onetask sequence and adding boxes for the time from 3 pm to 6 pm on theother.

The technology disclosed relates to simplifying for a non-programminguser creation of an entity management workflow by usingcomputer-implemented systems. The technology disclosed can beimplemented in the context of any computer-implemented system includinga database system, a multi-tenant environment, or a relational databaseimplementation like an Oracle™ compatible database implementation, anIBM DB2 Enterprise Server™ compatible relational databaseimplementation, a My SQL™ or PostgreSQL™ compatible relational databaseimplementation or a Microsoft SQL Server™ compatible relational databaseimplementation or a NoSQL non-relational database implementation such asa Vampire™ compatible non-relational database implementation, an ApacheCassandra™ compatible non-relational database implementation, aBigTable™ compatible non-relational database implementation or an HBase™or DynamoDB™ compatible non-relational database implementation.

Moreover, the technology disclosed can be implemented using two or moreseparate and distinct computer-implemented systems that cooperate andcommunicate with one another. The technology disclosed can beimplemented in numerous ways, including as a process, a method, anapparatus, a system, a device, a computer readable medium such as anon-transitory computer readable storage medium that stores computerreadable instructions or computer program code, or as a computer programproduct comprising a computer usable medium having a computer readableprogram code embodied therein.

In addition, the technology disclosed can be implemented using differentprogramming models like MapReduce™, bulk synchronous programming, MPIprimitives, etc. or different stream management systems like ApacheStorm™, Apache Spark™, Apace Kafka™, Truviso™, IBM Info-Sphere™,Borealis™ and Yahoo! S4™.

IoT Platform and Stream-Batch Processing Framework

We describe a system and various implementations of simplifying for anon-programming user creation of an entity management workflow. Thesystem and processes will be described with reference to FIG. 1 and FIG.2 showing an architectural level schematic of a system in accordancewith an implementation. Because FIG. 1 and FIG. 2 are architecturaldiagrams, certain details are intentionally omitted to improve theclarity of the description. The discussion of FIG. 1 and FIG. 2 will beorganized as follows. First, the elements of respective figures will bedescribed, followed by their interconnections. Then, the use of theelements in the system will be described in greater detail.

FIG. 1 includes exemplary IoT platform 100. IoT platform 100 includesdata sources 102, input connectors 104, stream container(s) 106, batchcontainer(s) 108, rich contextual data store 110, orchestration system112, output connectors 122 and application(s) 123. The rich contextualdata store 110 includes various storage nodes C1-C3. Orchestration 112includes a data entry columnar 114, an explorer engine 115, a livedashboard builder engine 116, a morphing engine 117, a tweening engine118, a tweening stepper 119, an integrated development environment (IDE)121 and a rendering engine 120. Application(s) 123 include various SaaS,PaaS and IaaS offerings. In other implementations, platform 100 may nothave the same elements as those listed above and/or may haveother/different elements instead of, or in addition to, those listedabove.

FIG. 2 illustrates a stream processing framework 200 used in theplatform example shown in FIG. 1, according to one implementation of thetechnology disclosed. Framework 200 includes data sources 102, inputpipeline 204, stream container 106, rich contextual data store 110 andoutput pipeline 218. Stream container 106 includes an emitter tier 206,a scheduler 208, a coordinator 210 and a worker tier 214. In otherimplementations, framework 200 may not have the same elements as thoselisted above and/or may have other/different elements instead of, or inaddition to, those listed above.

The interconnection of the elements of IoT platform 100 and streamingframework 200 will now be described. A network (not shown) couples thedata sources 102, the input connectors 104, the stream container 106,the batch container 108, the rich contextual data store 110, theorchestration system 112, the columnar 114, the output connectors 122,the application(s) 123, the input pipeline 204, the emitter tier 206,the scheduler 208, the coordinator 210, the worker tier 214 and theoutput pipeline 218, all in communication with each other (indicated bysolid double-arrowed lines). The actual communication path can bepoint-to-point over public and/or private networks. Some items, such asdata from data sources 102, might be delivered indirectly, e.g. via anapplication store (not shown). All of the communications can occur overa variety of networks, e.g. private networks, VPN, MPLS circuit, orInternet, and can use appropriate APIs and data interchange formats,e.g. REST, JSON, XML, SOAP and/or JMS. All of the communications can beencrypted. The communication is generally over a network such as the LAN(local area network), WAN (wide area network), telephone network (PublicSwitched Telephone Network (PSTN), Session Initiation Protocol (SIP),wireless network, point-to-point network, star network, token ringnetwork, hub network, Internet, inclusive of the mobile Internet, viaprotocols such as EDGE, 3G, 4G LTE, Wi-Fi and WiMAX. Additionally, avariety of authorization and authentication techniques, such asusername/password, OAuth, Kerberos, SecureID, digital certificates andmore, can be used to secure the communications.

Having described the elements of FIG. 1 (IoT platform 100) and FIG. 2(streaming framework 200) and their interconnections, the system willnow be described in greater detail.

Data sources 102 are entities such as a smart phone, a WiFi accesspoint, a sensor or sensor network, a mobile application, a web client, alog from a server, a social media site, etc. In one implementation, datafrom data sources 102 are accessed via an API Application ProgrammingInterface) that allows sensors, devices, gateways, proxies and otherkinds of clients to register data sources 102 in the IoT platform 100 sothat data can be ingested from them. Data from the data sources 102 caninclude events in the form of structured data (e.g. user profiles andthe interest graph), unstructured text (e.g. tweets) and semi-structuredinteraction logs. Examples of events include device logs, clicks onlinks, impressions of recommendations, numbers of logins on a particularclient, server logs, user's identities (sometimes referred to as userhandles or user IDs and other times the users' actual names), contentposted by a user to a respective feed on a social network service,social graph data, metadata including whether comments are posted inreply to a prior posting, events, news articles, and so forth. Eventscan be in a semi-structured data format like a JSON (JavaScript OptionNotation), BSON (Binary JSON), XML, Protobuf, Avro or Thrift object,which presents string fields (or columns) and corresponding values ofpotentially different types like numbers, strings, arrays, objects, etc.JSON objects can be nested and the fields can be multi-valued, e.g.,arrays, nested arrays, etc., in other implementations.

As described infra, near real-time (NRT) data streams 103 arecollections of events that are registered as they are generated by anentity. In one implementation, events are delivered over HTTP to inputpipeline 204. In another implementation, events are transmitted via POSTrequests to a receiver operating on behalf of input pipeline 204. Forinstance, Twitter Firehose API and Twitter4j (accessible viaTwitter-affiliated companies like Datashift and nTweetStreamer) provideunbounded time stamped events, called tweets, as a stream of JSONobjects along with metadata about those tweets, including timestamp dataabout the tweets, user information, location, topics, keywords,retweets, followers, following, timeline, user line, etc. These JSONobjects are stored in a schema-less or NoSQL key-value data-store likeApache Cassandra™, Google's BigTable™, HBase™, Voldemort™, CouchDB™,MongoDB™ Redis™, Riak™, Neo4j™, etc., which stores the parsed JSONobjects using key spaces that are equivalent to a database in SQL. Eachkey space is divided into column families that are similar to tables andcomprised of rows and sets of columns.

The input connectors 104 acquire data from data sources 102 andtransform the data into an input format that is consumable by containers106 and 108. In one implementation, the input connectors 104 performfull data pulls and/or incremental data pulls from the data sources 102.In another implementation, the input connectors 104 also access metadatafrom the data sources 102. For instance, the input connectors 104 issuea “describe” API call to fetch the metadata for an entity and then issuethe appropriate API call to fetch the data for the entity. In someimplementations, customized input connectors 104 are written using theConnector SDK™ for individual data sources 102.

In other implementations, a workflow definition includes a collection ofconnectors and operators as well as the order to execute them. In oneimplementation, such a workflow is specified as a directed graph, whereconnectors and operators are graph nodes and edges reflect the dataflow. In yet other implementations, multiple NRT data streams 103 arejoined and transformed before being fed to the containers 106 and 108.

Batch processing framework operating in container(s) 108 generatesbusiness intelligence using OnLine Analytical Processing (OLAP) queries,which are stored in rich contextual data store 110. In oneimplementation, events are stored in batch container(s) 108 to act as abackup for raw events on which batch processing jobs can run at anygiven time. Batch container(s) 108, in some implementations, providesraw counts as well as descriptive statistics such as mean, median andpercentile breakdowns. In one implementation, analytics tool likeScalding™ and Pig™ are included in batch container(s) 108 to provideretrospective analysis, machine learning modeling, and other batchanalytics. In yet other implementations, batch container(s) 108 is usedto correct errors made by the stream container 106 or to handle upgradedcapabilities by running analytics on historical data and recomputeresults. Examples of a batch processing framework include Hadoopdistributed file system (HDFS) implementing a MapReduce programmingmodel.

Batch container(s) 108 ingest event tuples from respective inputpipelines that collect data for a plurality of NRT data streams. In someimplementations, multiple NRT data streams can be assigned to a singlepipeline and multiple pipelines can be assigned to a single batchcontainer.

Stream processing framework 200 provides near real-time (NRT) processingof sequences of unbounded events for delivery of immediate analytics andinsights based on the events as they are occurring. In oneimplementation, framework 200 processes one million events per secondper node. Framework 200 can be implemented using one or more streamprocessors like Apache Storm™ and Apache Samza™ or a batch-streamprocessor such as Apache Spark™. In one implementation, framework 200includes an API to write jobs that run over a sequence of event-tuplesand perform operations over those event-tuples.

Events are ingested into framework 200 by input pipeline 204, whichreads data from the data sources 102 and holds events for consumption bythe stream container 106. In one implementation, input pipeline 204 is asingle delivery endpoint for events entering the container 106. Examplesof input pipeline 204 include Apache Kafka™, Kestrel™, Flume™ ActiveMQ™,RabbitMQ™, HTTP/HTTPS servers, UDP sockets, and others. In someimplementations, input pipeline 204 includes a listener capable oflistening NRT data streams 103 and data flows originating from the datasources 102 by connecting with their respective APIs (e.g., Chatter API,Facebook API (e.g., Open Graph), Twitter API (e.g., Twitter Firehose,Sprinklr, Twitter Search API, Twitter Streaming API), Yahoo API (e.g.,Boss) etc.) via the Internet. In some implementations, a listenerincludes heterogeneous instances responsible for the intake of data fromdifferent data sources 102. According to an implementation, the inputpipeline 204 can be configured to receive the data over the network(s)using an application protocol layer, or other higher protocol layer,such as HTTP protocol layer, among many possible standard andproprietary protocol layers. These higher protocol layers can encode,package and/or reformat data for sending and receiving messages over anetwork layer, such as Internet Protocol (IP), and/or a transport layer,such as Transmission Control Protocol (TCP) and/or User DatagramProtocol (UDP).

In a particular implementation, Apache Kafka™ is used as the inputpipeline 204. Kafka is a distributed messaging system with a publish andsubscribe model. Kafka maintains events in categories called topics.Events are published by so-called producers and are pulled and processedby so-called consumers. As a distributed system, Kafka runs in acluster, and each node is called a broker, which stores events in areplicated commit log. In other implementations, different messaging andqueuing systems can be used.

In one implementation, NRT data streams 103 are queued in input pipeline204 as batches. In one implementation, a batch is defined as anassemblage of event tuples, also referred to as “units of work”,partitioned on a time-slice basis and/or a batch-size basis. Atime-slice based definition includes partitioning at least one incomingNRT data stream by its most recently received portion within a timewindow (e.g., one batch keeps the event tuples from last one second). Abatch-size based definition includes partitioning at least one incomingNRT data stream by a most recently received portion limited orrestricted to or constrained by a data size (e.g., one batch includes 10MB of most recently received event tuples). In other implementations, acombination of time-size basis and batch-size basis is used to definebatches.

In a particular implementation, Apache Storm™ operates in streamcontainer 106 and performs real-time computation using a matrix ofuser-submitted directed acyclic graphs, comprised of a network of nodescalled “spouts” or “emitters” (collectively referred to as the emittertier 206 in FIG. 2) and “bolts” or “worker nodes” (collectively referredto as the worker tier 214 in FIG. 2). In a Storm matrix, a spout is thesource of NRT data streams 103 and a bolt holds the business logic foranalyzing and processing those streams to produce new data as output andpassing the output to the next stage in the matrix. In oneimplementation, a special Kafka Spout emits events read from a Kafkatopic as batches to bolts in worker tier 214.

Worker nodes in the worker tier 214 (shown as cubes in FIG. 2) performvarious stream processing jobs such as simple data transformation likeid to name lookups, up to complex operations such as multi-stream joins.Specifically, worker nodes in the worker tier 214 can perform tasks likeaggregations, functions and stream groupings (e.g., shuffle grouping,fields grouping, all grouping, and global grouping), filtering andcommits to external persistence layers like rich contextual data store110. In some implementations, worker nodes in a worker tier 214 havetransitive dependencies between related processing stages where upstreamstages produce event tuples that are consumed by downstream stages.

The messages passed within stream container 106 are called tuples. Atuple is a set of values for a pre-defined set of fields. Each spout orbolt defines the fields of the tuples it emits statically in advance.All tuples are serialized into a binary form before transmission toother components in the stream container 106. In some implementations,this serialization is handled by a Kryo library, which provides a fastserialization of Java objects.

Stream container 106 allows for parallelization of spouts and boltsusing different tuple grouping strategies to pass event streams. Thegrouping strategy defines the partitioning of an event stream andcontrols the number of logically parallel threads of the nextcomputational unit—the degree of parallelism refers to the number ofparallel executions.

Scheduler 208 tracks one or more input pipelines (e.g., input pipeline204) in the stream container 106 and schedules execution of batches andany downstream processing stages that depend on the output of anupstream completed processing stage. In one implementation, scheduler208 assigns a unique batch identifier (ID) to each batch in the inputpipeline 204. Further, scheduler 208 triggers either a resend of thecurrent batch or the next batch along with corresponding stageinformation on a per pipeline basis. Scheduler 208 also sends messagesto the coordinator 210 in the form [pipeline:‘a’,batch:7,stage‘b’]. Insome other implementations, scheduler 208 assigns priority-levels todifferent pipelines in the IoT platform 100. These priority-levelscontrol execution of a first number of batches from a first pipelinebefore execution of a second number of batches from a second pipeline.

Coordinator 210 controls dispatch of batches to worker nodes in theworker tier 214. When the scheduler 208 triggers a batch-stage, thecoordinator 210 sends triggers to the emitter tier 206 and worker tier214 who are responsible for that particular stage. When[pipeline:‘a’,batch:7,stage‘b’] is received by the coordinator 210, itcontacts two of the hundred available worker nodes. These are the twoworker nodes that received input from stage ‘a’.

Coordinator 210 also tracks pending units of work in the streamcontainer 106 for a given batch-stage to enable efficient “long-tail”operations where it is likely that a substantial portion of theallocated resources for a process may not be needed for a particularbatch. Take a single distributed operation having stage [a] and stage[b] such that the output of stage [a] is used at stage [b], representedas stage [a]->stage [b]. Now, assume that according to oneimplementation stage [a] runs on hundred worker nodes (each running on aphysical node) and stage [b] runs on hundred worker nodes (each runningon a physical node) and stage [a] produces output only for two instancesof stage [b]. When stage [a] has fully executed and stage [b] begins,the coordinator 210 knows that only two of the hundred worker nodesallocated to stage [b] need to be invoked. Similarly for three stageprocessing, represented as stage [a]->stage [b]->stage [c], where stage[b] receives no input from stage [a] and therefore stage [c] will alsoreceive no input, coordinator 210 avoids all extraneous communication tostage [b] and stage [c]. In the case of all data in stage [a] beingfiltered out, there is no communication overhead with the worker nodesallocated to stage [b] and stage [c].

Stream container(s) 106 ingest event tuples from respective inputpipelines that collect data for a plurality of NRT data streams. In someimplementations, multiple NRT data streams can be assigned to a singlepipeline and multiple pipelines can be assigned to a single streamcontainer.

Rich contextual data store 110 stores large volumes of historical dataand allows for historical query based analytics that are combined withnear real-time analytics. In one implementation, rich contextual datastore 110 is used to take a snapshot of tasks in the IoT platform 100and store state information about the pipelines, spouts, bolts and otherelements of the IoT platform 100. In some implementations, richcontextual data store 110 is a NoSQL key-value column store distributedstorage system like Apache Cassandra™. Data sent to Cassandra™ is spreadout across many nodes or commodity servers C1-C3, connections to whichcan be made using a Java, Scala, Ruby, Clojure or Python based APIs(e.g., Hector, Pelops, CQL, Thrift, Phpcassa, PyCassa, etc.). Cassandrastores data in units called columns. Each column is a tuple, a list ofassociated data elements. The basic column format can be represented as(name, value, timestamp). For brevity, the timestamp, while an essentialelement of the column, is often not written. Thus, an example column maybe written (UserName, User-1). An optional level of hierarchy called asuper column may incorporate any number of columns. Moving up a level,keys (sometimes referred to as rows) are tuples that include a name andone or more columns or super columns. An example key may be written(Status_Key, (UserName, User-1), (Logged_In, Y). Any number of keys maybe grouped into a column family. Analogously, a group of column familiesis referred to as the keyspace, the final level of hierarchy. Two pseudocode representations of the relationship can be constructed as follows:

-   -   [keyspace] [column family] [key] [column]    -   [keyspace] [column family] [key] [super column] [column]

Output pipeline 218 collects and queues processed events for delivery toa persistent store. In one implementation, data from output pipeline 218is transmitted concurrently to a SQL data store and NoSQL data storelike rich contextual data store 110. Output pipeline 218 can also behosted by Kafka, which acts a sink for the output of the jobs.

Orchestration

Orchestration 112 includes a web platform that enables non-programmersto construct and run an entity management workflow. Orchestration 112utilizes a declarative and visual programming model that generates adata entry columnar 114, which accepts declarative and drag-drop input.In one implementation, orchestration 112 allows non-programmers todesign their own workflows visually without extensive programmingknowledge. In one implementation, orchestration 112 uses a formaldeclarative description stored in a JSON configuration file. The JSONfile defines behaviors used in a session, including states of an entityduring a life cycle that specify events to handle, state transitiontriggers the transition rules to be used, and responsive actions thatspecify the actions rules to be used, along with other parameters andvariables to be used in a workflow. In other implementations, differentprogramming languages like hypertext markup language (HTML), standardgeneralized markup language (SGML), declarative markup language (DML),extensible markup language (XAML and XML), extensible stylesheetlanguage (XSL), extensible stylesheet language transformations (XSLT),functional programming language like Haskell and ML, logic programminglanguage like Prolog, dataflow programming language like Lucid,rule-based languages like Jess, Lips and CLIPS, and others.

In another implementation, orchestration 112 includes a declarativecomponent and a run-time component. Using the declarative component, anon-programmer declares entity states, transition triggers for thestates, responsive actions for the states and other parameters andvariables of the entity lifecycle workflow. In one implementation, thedeclarative component offers existing workflow or workflow excerptscommon used by other users and communities. In one implementation, thedeclarative input is received at a browser in a visual manner ratherthan a result of writing code. The declarative input is then translatedby orchestration 112 into a package of declarative files (e.g., XML)that can be directly executed in the run-time component.

In a further implementation, the run-time component of orchestration 112includes a translator that interprets the declarative files usingrelational and XML-native persistent services, gateway, SOAP, REST APIand semantic functionalities like machine learning, clustering,classifier-based classification and recommendation, context textanalysis, text extraction and modeling, deep linguistic analysis andexpressions based alphanumeric pattern detection.

In yet another implementation, orchestration 112 serves as a rule engineand scripting environment for non-declarative languages like Java andC++. In such an implementation, orchestration 112 provides rule-basedprogramming in a high-level procedural or imperative programminglanguage by continuously applying a set of rules to a set of facts. Therules can modify the facts or execute and procedural or imperative code(e.g., Java code). In some implementations, orchestration 112 includes agraphical rule development environment based on an integrateddevelopment environment (IDE) providing editor functions, codeformatting, error checking, run and debug commands and a graphicaldebugger.

Orchestration 112 also includes an explorer engine 115, a live dashboardbuilder engine 116, a morphing engine 117, a tweening engine 118, atweening stepper 119, an integrated development environment (IDE) 121and a rendering engine 120.

A disclosed live dashboard builder engine 116 designs dashboards,displaying multiple analytics developed using the explorer engine 115 asreal-time data query results. That is, a non-technical user can arrangedisplay charts for multiple sets of query results from the explorerengine 115 on a single dashboard. When a change to a rule-base affectsany display chart on the dashboard, the remaining display charts on thedashboard get updated to reflect the change. Accurate live query resultsare produced and displayed across all display charts on the dashboard.

In one implementation, a real-time query language called “EQL language”is used by orchestration 112 to enable data flows as a means of aligningresults. It enables ad hoc analysis of registered event tuples. Anon-technical user can specify state definitions, state transitiontriggers, state transition conditions and state transition actions tochange query parameters and can choose different display options, suchas a bar chart, pie chart or scatter plot—triggering a real-time changeto the display chart—based on a live data query using the updatedrule-base. Statements in an EQL script include keywords (such as filter,group, and order), identifiers, literals, or special characters. EQL isdeclarative; you describe what you want to get from your query. Then, aquery engine will decide how to efficiently serve it.

In one implementation, a runtime framework with an event bus handlescommunication between application(s) 123 running on user computingdevices, a query engine (not shown) and an integrated developmentenvironment 121, which provides a representation of animated datavisualizations implemented in a hierarchy of levels including states,triggers, state transitions, responsive actions, entity activity levelsand variations among them over time, real-time event streams, trails ofentity transitions from one state to another, and the sizes of the statetypes based on a number of entities belonging to a particular statetype.

Integrated development environment 121 provides a representation ofanimated data visualizations. Integrated development environment 121also provides an interface for processing animation scripts that animatetransitions between the shapes applied to data visualizations. Exampleanimation transitions include scaling so that charts fit the displayenvironment, and are not clipped; and rotations between vertical andhorizontal display. Animation scripts are represented usingnon-procedural data structures that represent shapes to be rendered, andthat represent animations of the transitions between the shapes to berendered. In one example implementation, JSON can be used to express thegenerated non-procedural data structures.

Rendering engine 120 transforms non-procedural data structures thatrepresent the shapes and the animation of transitions between theshapes, into rendered graphics.

In other implementations, orchestration 112 may not have the sameelements as those listed above and/or may have other/different elementsinstead of, or in addition to, those listed above.

The output connectors 122 send data from orchestration 112 and/or outputpipeline 218 and transform the data into an output format that isconsumable by application(s) 123. In one implementation, the outputconnectors 122 perform full data pushes and/or incremental data pushesfrom orchestration 112. In another implementation, the output connectors122 also provide metadata from the orchestration 112. In someimplementations, customized output connectors 122 are written using theConnector SDK™ for individual application(s) 123.

Application(s) 123 include components adapted for operating in the IoTplatform 100. The IoT platform 100, or an analog, can be provided by anode such as an application server node. Application(s) 123 can includean incoming and outgoing data handler component for receiving andtransmitting information from and to the plurality of application servernodes via the network(s).

In an implementation, the application(s) 123 include a data store forstoring a plurality of data objects including a plurality of contactrecords, a plurality of account records, and/or other records(collectively application records). In some implementations, anapplication record can include, but is not limited to, a tuplecorresponding to a user, a file, a folder, an opportunity, an account,an event, and/or any data object. Application(s) 123 can include a datamanager component that can be configured to insert, delete, and/orupdate the records stored in the data store. In addition, application(s)123 can include a monitoring agent that is configured to monitoractivities related to the application records. For example, themonitoring agent can be configured to track a user's post via a publicor private social networking service, and/or a user's e-mail client onthe user's enterprise desktop computer, and to monitor updates to thecontact records, event records, and/or any other application record(s)stored in the data store.

Processed events can additionally be used by application(s) 123, such asSalesforce.com offerings like Sales cloud™, Data.com™, Service Cloud™,Desk.com™ Marketing Cloud™, Pardot™, Service Cloud™ and Wave Analytics™.For example, processed events can be used to identify opportunities,leads, contacts, and so forth, in the application(s) 123, or can be usedto support marketing operations with products such as Radian6™, BuddyMedia™ services, and the like. The processed events can also then inturn be used to find these specific users again on these socialnetworks, using matching tools provided by the social network providers.Additionally they could also be layered with specific targeting learnedfrom the aggregation and analysis by the stream container 106 andorchestration 112 respectively.

In an implementation, IoT platform 100 can be located in a cloudcomputing environment, and may be implemented as a multi-tenant databasesystem. As used herein, the term multi-tenant database system refers tothose systems in which various elements of hardware and software of thedatabase system may be shared by one or more tenants. For example, agiven application server may simultaneously process requests for a greatnumber of tenants, and a given database table may store rows formultiple tenants.

In some implementations, the elements or components of IoT platform 100can be engines of varying types including workstations, servers,computing clusters, blade servers, server farms, or any other dataprocessing systems or computing devices. The elements or components canbe communicably coupled to the databases via a different networkconnection. For example, stream container 106 can be coupled via thenetwork(s) (e.g., the Internet), batch container 108 can be coupled viaa direct network link, and orchestration 112 can be coupled by yet adifferent network connection.

In some implementations, databases used in IoT platform 100 can storeinformation from one or more tenants into tables of a common databaseimage to form a multi-tenant database system (MTS). A database image caninclude one or more database objects. In other implementations, thedatabases can be relational database management systems (RDBMS), objectoriented database management systems (OODBMS), distributed file systems(DFS), no-schema database management systems, or any other data storingsystems or computing devices.

While IoT platform 100 is described herein with reference to particularblocks, it is to be understood that the blocks are defined forconvenience of description and are not intended to require a particularphysical arrangement of component parts. Further, the blocks need notcorrespond to physically distinct components. To the extent thatphysically distinct components are used, connections between components(e.g., for data communication) can be wired and/or wireless as desired.The different elements or components can be combined into singlesoftware modules and multiple software modules can run on the samehardware.

Concurrent and Multiplexed Processing Combination

FIG. 3 is one implementation 300 of worker tier 214 that includes aworker node 1 with a plurality of physical threads PT1-PT10. Eachphysical thread PT1-PT10 utilizes a whole processor core of the workernode 1 selected from one of the processor cores 1-10. Worker tier 214also includes worker nodes 2-3, which have their own sets of physicalthreads, with each physical thread utilizing a whole processor core.

FIG. 4A and FIG. 4B depict one implementation 400A-B of concurrentlyprocessing batches in a pipeline when a count of available physicalthreads equals or exceeds a set number of logically parallel threads. Inexemplary scenario illustrated in FIG. 4A, the number of logicallyparallel threads i.e. degree of parallelism is ten. Also in FIG. 4A, thenumber of available physical threads is ten i.e. PT1-PT10. Thus, whenten batches B1-10 are queued in input pipeline 204, coordinator 210concurrently processes the batches B1-B10 at the available ten physicalthreads PT1-PT10 as shown in FIG. 4B. This concurrent processing 400Boccurs because, at run-time, the coordinator determined that the countof available physical threads PT1-PT10 equaled the set number oflogically parallel threads (ten).

FIG. 5A, FIG. 5B and FIG. 5C show one implementation 500A-C ofmultiplexing batches B1-10 in a pipeline when there are fewer availablephysical threads than a set number of logically parallel threads. Inexemplary scenario 500A illustrated in FIG. 5A, a set number oflogically parallel threads i.e. parallelism is ten. However, the numberof available physical threads is only nine i.e. PT1-PT9. The unavailablephysical thread PT10 is depicted by a greyed-out box in FIG. 5A, FIG. 5Band FIG. 5C. In some implementations, unavailability refers to that factthat an excessive or equaling thread has not even been initiated, andfor such an implementation the unavailable physical thread PT10 wouldnot have been depicted in FIG. 5A, FIG. 5B and FIG. 5C. In otherimplementations, unavailability refers to the fact that an alreadyinitiated physical thread has failed and is not capable of processingbatches, as depicted in the exemplary scenario of FIG. 5A, FIG. 5B andFIG. 5C.

The technology disclosed adapts to this discrepancy in the availablecomputation resources PT1-PT10 and the data units B1-B10 to be processedby multiplexing the batches B1-B10 sequentially over the nine availablephysical threads PT1-PT9. Multiplexing includes concurrently processingbatches B1-B9 over the available physical threads PT1-PT9 and when oneof the batch (like B9) from batches B1-B9 completes processing by theavailable physical thread or queues at the output pipeline 218, the nextbatch B10 in the input pipeline 204 is processed at the next availablephysical thread (like PT9) by the coordinator 210, as shown in FIG. 5C.

Multi-Stage Processing with Strong Ordering

FIG. 6A is one implementation of multi-stage processing 600A of a batchidentified as batch 1. The exemplary scenarios in FIG. 6A and FIG. 6Bcreate a Twitter™ analytics tool. During the multi-stage processing600A, tweets (Tweet_1 to Tweet_8) are stored in batch 1 as individualtuples. These tweets are processed through an emitter 602 andtransformers 604, 606 and 608 of a container (not shown). The resultinganalytics will list all hashtags in the tweets and their frequency amongthe tweets, the list of all users and number of tweets they appear in,and a list of users with their hashtags and frequency. Also, the orderof the output follows the listing order of the tweets (Tweet_1 toTweet_8) in batch 1.

The multi-stage processing 600A and 600B is divided into twostages—stage A and stage B. In stage A, a “TwitterIngestEmitter” 602connects to the Twitter API and emits tweet tuples to the transformers604, 606 and 608. “@Transformer” 604 parses the tweets and identifiesusers by looking for words preceded by “@” and sends those words in astream called “@stream” to “@#JoinTransformer” 608. Also in stage A, a“#Transformer” 606 parses the tweets and looks for wards preceded by “#”and sends those words as a “#stream” to “@#JoinTransformer” 608. Forprocessing stage A, coordinator 210 utilizes physical threads PT4 andPT6, which are greyed-out in FIG. 6A and FIG. 6B. This stage informationis stored at scheduler 208, which communicates it to the coordinator 210at run-time.

In stage B, a “@#JoinTransformer” 608 receives both the streams, @streamand #stream, and counts how many times a hashtag has appeared in a tweetwhere a user was mentioned. When the stage B is initiated in FIG. 6B,the coordinator 210 identifies that physical threads PT4 and PT6 did thestage A processing and dispatches the streams (@stream and #stream) tobe processed at the same physical threads PT4 and PT6 for“@#JoinTransformer” 608.

Furthermore, coordinator 210 maintains a strong ordering in the outputby ensuring that both batch-units of batch 1 i.e. @stream and #streamare completely processed in stage A before either one of them isprocessed by “@#JoinTransformer” 608 in stage B.

Priority Scheduler

FIG. 7A illustrates one implementation of queuing 700A data from aplurality of NRT data streams 704, 714 and 724 as batches in multiplepipelines 706, 716 and 726 using a coordinator 210 that controlsdispatch of the batches to physical threads running in worker nodes of aworker tier 214. In FIG. 7C and FIG. 7D, an input pipeline, whosebatches are all dispatched, is depicted by a dash-lined visual coding.Also, in FIG. 7B, FIG. 7C and FIG. 7D an input pipeline, whose batchesare currently being dispatched, is depicted by a greyed-out visualcoding.

In particular, the pipelines 706, 716 and 726 shown in FIG. 7A, FIG. 7B,FIG. 7C and FIG. 7D have different priority levels assigned to them by agrid scheduler 208. NRT data streams 704, 714 and 724 source data fromdifferent data sources 702, 712 and 722, which are queued in pipelines706, 716 and 726 as batches.

Pipelines 706, 716 and 726 can have varying amount of data or number ofbatches. Moreover, they can have different priority levels. Thesepriority levels can be configured as alphanumeric character ranges suchas 1-10 or A-B or X-Z, in one implementation. In another implementation,the priority levels are proportional to the number of batches that willbe executed from a higher priority pipeline before execution of a numberof batches from a lower priority pipeline. The proportional correlationcan be of the order of 10, 100 or another augmentation. For instance, aparticular pipeline with a priority level 10 executes 1000 batchesbefore another pipeline with priority level 1 executes 10 batches. Inyet another implementation, the priority levels are tied to theprocessing time such that a particular pipeline with a priority level 10gets ten times the processing time as another pipeline with prioritylevel 1. In a further implementation, the priority levels are tied tothe number of physical threads a pipeline gets processed by within aworker node such that a particular pipeline with a priority level 10gets ten times the number of physical threads as another pipeline withpriority level 1. In a still further implementation, the priority levelsare tied to the number of worker nodes a pipeline gets processed bywithin a worker tier such that a particular pipeline with a prioritylevel 10 gets ten times the number of worker nodes as another pipelinewith priority level 1. Other implementations can include using adifferent correlation model between pipelines that applies programmedprocessing of multiple pipelines.

FIG. 7B shows one implementation of executing batches 700B of a highestpriority pipeline before other pipelines with medium and low priorities.In FIG. 7B, input pipeline 706 has the highest priority A, and thus allof its batches B1-B5 are dispatched by the coordinator 210, processed bythe worker tier 214 and queued in the output pipeline 708 before any ofthe respective batches B1-B3 and B1-B5 of respective input pipelines 726and 716 with respective priorities B and C are dispatched by thecoordinator 210.

FIG. 7C shows one implementation of executing 700C batches of amedium-priority pipeline after a highest priority pipeline but before alow-priority pipeline. In FIG. 7C, the input pipeline 706 with highestpriority A has been completely executed and its batches queued in outputpipeline 708. Now, all the batches B1-B3 of the input pipeline 726 withmedium-priority B are executed before any of the batches of inputpipeline 716 with lowest priority C are executed.

FIG. 7D depicts one implementation of executing 700D batches of a lowestpriority pipeline after other pipelines with highest and mediumpriorities. In FIG. 7D, the input pipeline 726 with medium-priority Bhas been completely executed and its batches queued in output pipeline728. Now, all the batches B1-B5 of the input pipeline 716 with lowestpriority C are executed after input pipeline 726 with medium-priority Bis completely executed.

FIG. 8A shows one implementation of tracking 800A NRT data streams usinga filter server 802 that detects data belonging to a long tail tasksequence 1 and a surging task sequence 1 based unique task sequenceidentifiers (IDs) of the respective task sequences. In FIG. 8A, tasksequence 1 is a normal task sequence because it has not shown muchfluctuation in the amount of data its NRT data stream(s) is emitting.Also in FIG. 8A, task sequence 2 is a long tail task sequence becauseits NRT data stream(s) is emitting measurably less data than before.Also in FIG. 8A, task sequence 3 is a surging task sequence because itsNRT data stream(s) is emitting measurably more data than before.

Furthermore, in FIG. 8A, input pipeline 810 has the highest priority A,input pipeline 830 has the medium-priority B and input pipeline 820 hasthe lowest priority C.

FIG. 8B shows one implementation of assigning 800B, a long tail tasksequence, to a low-priority pipeline and assigning a surging tasksequence to a high-priority pipeline. In FIG. 8B, surging task sequence3 is assigned input pipeline 810 with highest priority A because such anassignment ensures that batches of the surging task sequence 3 areprocessed before and faster than other pipelines. Such a configurationmaintains the balanced load in the container and allows for fairallocation of resources to users that need great computational resourcesbecause of the high volume of their incoming data.

Also in FIG. 8B, long tail task sequence 2 is assigned input pipeline820 with lowest priority C because such an assignment ensures thatbatches of the long tail task sequence 2 are processed at a slow andsteady rate. Such a configuration prevents wastage of computationresources and computational time in a container because more physicalthreads and worker nodes can be allotted to other input pipelines (likeinput pipeline 810) that have high incoming volumes of data.

Also, other components of a container like coordinator 210 and workernodes are prevented from idle computing that is caused by the longwaiting period characteristic of slow incoming data of a long tail tasksequence. For example, if a task sequence was initially generatingtwenty million e-mails per day and is now generating only twenty e-mailsper day, then computation resources and computational time for such along tail tasks sequence are provided to another task sequence bymigrating 800C the long tail task sequence to a low-priority pipeline(e.g., input pipeline 820), as shown in FIG. 8C.

On the other hand, resolution of the shortage of computation resourcesand computational time for a surging task sequence (e.g., task sequence1 in FIG. 8D), which previously was a normal task sequence (depicted bydotted lines), is handled by migrating the surging task sequence shownin 800D to a higher priority pipeline (e.g., input pipeline 810), asshown in FIG. 8D.

Multi-Tenant Integration

FIG. 9 is a block diagram of an exemplary multi-tenant system 900suitable for integration with in the IoT platform 100 of FIG. 1 inaccordance with one or more implementation.

IoT platform 100 of FIG. 1 can be implemented using a multi-tenantsystem. In that regard, FIG. 9 presents a conceptual block diagram of anexemplary multi-tenant system suitable for integration with the IoTplatform 100 of FIG. 1 in accordance with one or more implementations.

In general, the illustrated multi-tenant system 900 of FIG. 9 includes aserver 902 that dynamically creates and supports virtual applications928A and 928B based upon data 932 from a common database 930 that isshared between multiple tenants, alternatively referred to herein as a“multi-tenant database”. Data and services generated by the virtualapplications 928A and 928B are provided via a network 945 to any numberof client devices 940A and 940B, as desired. Virtual applications 928Aand 928B are suitably generated at run-time (or on-demand) using acommon application platform 910 that securely provides access to thedata 932 in the database 930 for each of the various tenants subscribingto the multi-tenant system 900. In accordance with one non-limitingexample, the multi-tenant system 900 is implemented in the form of anon-demand multi-tenant user relationship management (CRM) system thatcan support any number of authenticated users of multiple tenants.

As used herein, a “tenant” or an “organization” refers to a group of oneor more users that shares access to common subset of the data within themulti-tenant database 930. In this regard, each tenant includes one ormore users associated with, assigned to, or otherwise belonging to thatrespective tenant. Stated another way, each respective user within themulti-tenant system 900 is associated with, assigned to, or otherwisebelongs to a particular tenant of the plurality of tenants supported bythe multi-tenant system 900. Tenants may represent users, userdepartments, work or legal organizations, and/or any other entities thatmaintain data for particular sets of users within the multi-tenantsystem 900. Although multiple tenants may share access to the server 902and the database 930, the particular data and services provided from theserver 902 to each tenant can be securely isolated from those providedto other tenants. The multi-tenant architecture therefore allowsdifferent sets of users to share functionality and hardware resourceswithout necessarily sharing any of the data 932 belonging to orotherwise associated with other tenants.

The multi-tenant database 930 is any sort of repository or other datastorage system capable of storing and managing the data 932 associatedwith any number of tenants. The database 930 may be implemented usingany type of conventional database server hardware. In variousimplementations, the database 930 shares processing hardware with theserver 902. In other implementations, the database 930 is implementedusing separate physical and/or virtual database server hardware thatcommunicates with the server 902 to perform the various functionsdescribed herein. In an exemplary implementation, the database 930includes a database management system or other equivalent softwarecapable of determining an optimal query plan for retrieving andproviding a particular subset of the data 932 to an instance of virtualapplication 928A or 928B in response to a query initiated or otherwiseprovided by a virtual application 928A or 928B. The multi-tenantdatabase 930 may alternatively be referred to herein as an on-demanddatabase, in that the multi-tenant database 930 provides (or isavailable to provide) data at run-time to on-demand virtual applications928A and 928B generated by the application platform 910.

In practice, the data 932 may be organized and formatted in any mannerto support the application platform 910. In various implementations, thedata 932 is suitably organized into a relatively small number of largedata tables to maintain a semi-amorphous “heap”-type format. The data932 can then be organized as needed for a particular virtual application928A or 928B. In various implementations, conventional datarelationships are established using any number of pivot tables 934 thatestablish indexing, uniqueness, relationships between entities, and/orother aspects of conventional database organization as desired. Furtherdata manipulation and report formatting is generally performed atrun-time using a variety of metadata constructs. Metadata within auniversal data directory (UDD) 936, for example, can be used to describeany number of forms, reports, workflows, user access privileges, worklogic and other constructs that are common to multiple tenants.Tenant-specific formatting, functions and other constructs may bemaintained as tenant-specific metadata 938A- and 938B for each tenant,as desired. Rather than forcing the data 932 into an inflexible globalstructure that is common to all tenants and applications, the database930 is organized to be relatively amorphous, with the pivot tables 934and the metadata 938A and 938B providing additional structure on anas-needed basis. To that end, the application platform 910 suitably usesthe pivot tables 934 and/or the metadata 938A and 938B to generate“virtual” components of the virtual applications 928A and 928B tologically obtain, process, and present the relatively amorphous data 932from the database 930.

The server 902 is implemented using one or more actual and/or virtualcomputing systems that collectively provide the dynamic applicationplatform 910 for generating the virtual applications 928A and 928B. Forexample, the server 902 may be implemented using a cluster of actualand/or virtual servers operating in conjunction with each other,typically in association with conventional network communications,cluster management, load balancing and other features as appropriate.The server 902 operates with any sort of conventional processinghardware, such as a processor 905, memory 906, input/output features 907and the like. The input/output features 907 generally represent theinterface(s) to networks (e.g., to the network 945, or any other localarea, wide area or other network), mass storage, display devices, dataentry devices and/or the like. The processor 905 may be implementedusing any suitable processing system, such as one or more processors,controllers, microprocessors, microcontrollers, processing cores and/orother computing resources spread across any number of distributed orintegrated systems, including any number of “cloud-based” or othervirtual systems. The memory 906 represents any non-transitory short orlong term storage or other computer-readable media capable of storingprogramming instructions for execution on the processor 905, includingany sort of random access memory (RAM), read only memory (ROM), flashmemory, magnetic or optical mass storage, and/or the like. Thecomputer-executable programming instructions, when read and executed bythe server 902 and/or processor 905, cause the server 902 and/orprocessor 705 to create, generate, or otherwise facilitate theapplication platform 910 and/or virtual applications 928A and 928B andperform one or more additional tasks, operations, functions, and/orprocesses described herein. It should be noted that the memory 906represents one suitable implementation of such computer-readable media,and alternatively or additionally, the server 902 could receive andcooperate with external computer-readable media that is realized as aportable or mobile component or application platform, e.g., a portablehard drive, a USB flash drive, an optical disc, or the like.

The application platform 910 is any sort of software application orother data processing engine that generates the virtual applications928A and 928B that provide data and/or services to the client devices940A and 940B. In a typical implementation, the application platform 910gains access to processing resources, communications interfaces andother features of the processing hardware 904 using any sort ofconventional or proprietary operating system 908. The virtualapplications 928A and 928B are typically generated at run-time inresponse to input received from the client devices 940A and 940B. Forthe illustrated implementation, the application platform 910 includes abulk data processing engine 912, a query generator 914, a search engine916 that provides text indexing and other search functionality, and aruntime application generator 920. Each of these features may beimplemented as a separate process or other module, and many equivalentimplementations could include different and/or additional features,components or other modules as desired.

The runtime application generator 920 dynamically builds and executesthe virtual applications 928A and 928B in response to specific requestsreceived from the client devices 940A and 940B. The virtual applications928A and 928B are typically constructed in accordance with thetenant-specific metadata 938, which describes the particular tables,reports, interfaces and/or other features of the particular application928A and 928B. In various implementations, each virtual application 928Aand 928B generates dynamic web content that can be served to a browseror other client programs 942A and 942B associated with its client device940A and 940B, as appropriate.

The runtime application generator 920 suitably interacts with the querygenerator 914 to efficiently obtain multi-tenant data 932 from thedatabase 930 as needed in response to input queries initiated orotherwise provided by users of the client devices 940A and 940B. In atypical implementation, the query generator 914 considers the identityof the user requesting a particular function (along with the user'sassociated tenant), and then builds and executes queries to the database930 using system-wide metadata within a universal data directory (UDD)936, tenant specific metadata 938, pivot tables 934, and/or any otheravailable resources. The query generator 914 in this example thereforemaintains security of the common database 930 by ensuring that queriesare consistent with access privileges granted to the user and/or tenantthat initiated the request. In this manner, the query generator 914suitably obtains requested subsets of data 932 accessible to a userand/or tenant from the database 930 as needed to populate the tables,reports or other features of the particular virtual application 928A or928B for that user and/or tenant.

Still referring to FIG. 9, the data processing engine 912 performs bulkprocessing operations on the data 932 such as uploads or downloads,updates, online transaction processing, and/or the like. In manyimplementations, less urgent bulk processing of the data 932 can bescheduled to occur as processing resources become available, therebygiving priority to more urgent data processing by the query generator914, the search engine 916, the virtual applications 928A and 928B, etc.

In exemplary implementations, the application platform 910 is utilizedto create and/or generate data-driven virtual applications 928A and 928Bfor the tenants that they support. Such virtual applications 928A and928B may make use of interface features such as custom (ortenant-specific) screens 924, standard (or universal) screens 922 or thelike. Any number of custom and/or standard objects 926 may also beavailable for integration into tenant-developed virtual applications928A and 928B. As used herein, “custom” should be understood as meaningthat a respective object or application is tenant-specific (e.g., onlyavailable to users associated with a particular tenant in themulti-tenant system) or user-specific (e.g., only available to aparticular subset of users within the multi-tenant system), whereas“standard” or “universal” applications or objects are available acrossmultiple tenants in the multi-tenant system. The data 932 associatedwith each virtual application 928A and 928B is provided to the database930, as appropriate, and stored until it is requested or is otherwiseneeded, along with the metadata 938 that describes the particularfeatures (e.g., reports, tables, functions, objects, fields, formulas,code, etc.) of that particular virtual application 928A and 928B. Forexample, a virtual application 928A and 928B may include a number ofobjects 926 accessible to a tenant, wherein for each object 926accessible to the tenant, information pertaining to its object typealong with values for various fields associated with that respectiveobject type are maintained as metadata 938 in the database 930. In thisregard, the object type defines the structure (e.g., the formatting,functions and other constructs) of each respective object 926 and thevarious fields associated therewith.

With continued reference to FIG. 9, the data and services provided bythe server 902 can be retrieved using any sort of personal computer,mobile telephone, tablet or other network-enabled client device 940A or940B on the network 945. In an exemplary implementation, the clientdevice 940A or 940B includes a display device, such as a monitor,screen, or another conventional electronic display capable ofgraphically presenting data and/or information retrieved from themulti-tenant database 930. Typically, the user operates a conventionalbrowser application or other client program 942 executed by the clientdevices 940A and 940B to contact the server 902 via the network 945using a networking protocol, such as the hypertext transport protocol(HTTP) or the like. The user typically authenticates his or her identityto the server 902 to obtain a session identifier (“SessionID”) thatidentifies the user in subsequent communications with the server 902.When the identified user requests access to a virtual application 928Aor 928B, the runtime application generator 920 suitably creates theapplication at run time based upon the metadata 938, as appropriate. Asnoted above, the virtual application 928A or 928B may contain Java,ActiveX, or other content that can be presented using conventionalclient software running on the client device 940A or 940B; otherimplementations may simply provide dynamic web or other content that canbe presented and viewed by the user, as desired.

The foregoing description is merely illustrative in nature and is notintended to limit the implementations of the subject matter or theapplication and uses of such implementations. Furthermore, there is nointention to be bound by any expressed or implied theory presented inthe technical field, background, or the detailed description. As usedherein, the word “exemplary” means “serving as an example, instance, orillustration.” Any implementation described herein as exemplary is notnecessarily to be construed as preferred or advantageous over otherimplementations, and the exemplary implementations described herein arenot intended to limit the scope or applicability of the subject matterin any way.

For the sake of brevity, conventional techniques related to databases,social networks, user interfaces, and other functional aspects of thesystems (and the individual operating components of the systems) may notbe described in detail herein. In addition, those skilled in the artwill appreciate that implementations may be practiced in conjunctionwith any number of system and/or network architectures, datatransmission protocols, and device configurations, and that the systemdescribed herein is merely one suitable example. Furthermore, certainterminology may be used herein for the purpose of reference only, andthus is not intended to be limiting. For example, the terms “first”,“second” and other such numerical terms do not imply a sequence or orderunless clearly indicated by the context.

Implementations of the subject matter may be described herein in termsof functional and/or logical block components, and with reference tosymbolic representations of operations, processing tasks, and functionsthat may be performed by various computing components or devices. Suchoperations, tasks, and functions are sometimes referred to as beingcomputer-executed, computerized, software-implemented, orcomputer-implemented. In practice, one or more processing systems ordevices can carry out the described operations, tasks, and functions bymanipulating electrical signals representing data bits at accessiblememory locations, as well as other processing of signals. The memorylocations where data bits are maintained are physical locations thathave particular electrical, magnetic, optical, or organic propertiescorresponding to the data bits. It should be appreciated that thevarious block components shown in the figures may be realized by anynumber of hardware, software, and/or firmware components configured toperform the specified functions. For example, an implementation of asystem or a component may employ various integrated circuit components,e.g., memory elements, digital signal processing elements, logicelements, look-up tables, or the like, which may carry out a variety offunctions under the control of one or more microprocessors or othercontrol devices. When implemented in software or firmware, variouselements of the systems described herein are essentially the codesegments or instructions that perform the various tasks. The program orcode segments can be stored in a processor-readable medium ortransmitted by a computer data signal embodied in a carrier wave over atransmission medium or communication path. The “processor-readablemedium” or “machine-readable medium” may include any non-transitorymedium that can store or transfer information. Examples of theprocessor-readable medium include an electronic circuit, a semiconductormemory device, a ROM, a flash memory, an erasable ROM (EROM), a floppydiskette, a CD-ROM, an optical disk, a hard disk, a fiber optic medium,a radio frequency (RF) link, or the like. The computer data signal mayinclude any signal that can propagate over a transmission medium such aselectronic network channels, optical fibers, air, electromagnetic paths,or RF links. The code segments may be downloaded via computer networkssuch as the Internet, an intranet, a LAN, or the like. In this regard,the subject matter described herein can be implemented in the context ofany computer-implemented system and/or in connection with two or moreseparate and distinct computer-implemented systems that cooperate andcommunicate with one another. In one or more exemplary implementations,the subject matter described herein is implemented in conjunction with avirtual user relationship management (CRM) application in a multi-tenantenvironment.

Leveraging Common Container Dependencies

The technology disclosed reduces the amount of dedicated hardware andclients required to connect multiple pipelines in a container to commonresources. For example, if thousand pipelines are processed over hundredworker nodes in a container, then at least ten connections are needed tobe configured with relevant container resources such as a message bus(like Apache Kafka™), an output queue or sink (like Apache Kafka™), apersistence store (like Apache Cassandra™) and a global service registry(Zookeeper™). Thus, in total, for such a container, a thousandconnections need to be made to each of the different relevant resources.

The technology disclosed solves this technical problem by allowing themultiple pipelines in a container to connect to relevant resources usingcommon connections, thereby substantially reducing the number ofsimultaneous connections to relevant container resources. Oneimplementation of the technical solution is disclosed in FIG. 10, whichshows one implementation of concurrent processing 1000 of multiplepipelines 1002, 1012 and 1022 in a container 106 using commonconnections 1 and 2 to reduce the number of simultaneous connections tothe rich contextual data store 110 and output pipeline 1028 used by thecontainer. In FIG. 10, batches belonging to the same pipeline have thesame shading and batches from different pipelines have differentshading. For instance, batches A1-A7 belong to input pipeline 1002 andhave light grey color coding. Batches B1-B7 belong to input pipeline1012 and have grey color coding. Finally, batches C1-C7 belong to inputpipeline 1022 and have dark grey color coding.

In FIG. 10, all three pipelines 1002, 1012 and 1022 and their batchesA1-A7, B1-B7 and C1-C7 are processed at the same worker node 1.Consequently, connections to relevant container resources like key-valuedata in rich contextual data store 110 and output pipeline 1028 arerestricted to singletons common connection 1 and common connection 2respectively, instead of what otherwise could be six connections for thethree pipelines 1002, 1012 and 1022, three connections to the key-valuedata in rich contextual data store 110 and three to the output pipeline1028.

Flowchart

FIG. 11 shows one implementation of a flowchart 1100 of maintainingthroughput of a stream processing framework while increasing processingload. Flowchart 1100 can be implemented at least partially with acomputer or other data processing system, e.g., by one or moreprocessors configured to receive or retrieve information, process theinformation, store results, and transmit the results. Otherimplementations may perform the actions in different orders and/or withdifferent, fewer or additional actions than those illustrated in FIG.11. Multiple actions can be combined in some implementations. Forconvenience, this workflow is described with reference to the systemthat carries out a method. The system is not necessarily part of themethod.

At action 1110, the method includes defining a container over at leastone worker node that has a plurality of workers, with one workerutilizing a whole process or core within a worker node, as describedsupra.

At action 1120, the method includes queuing data from one or moreincoming near real-time (NRT) data streams in multiple pipelines thatrun in the container and have connections to at least one commonresource external to the container, as described supra.

At action 1130, the method includes concurrently executing the pipelinesat a number of workers as batches, as described supra.

At action 1140, the method includes limiting simultaneous connectionsbetween the common resource and the workers by providing a sharedconnection used to process a set of batches running on a same workerregardless of the pipelines to which the batches in the set belong, asdescribed supra.

In some implementations of a disclosed method, processed batches fromthe pipelines are committed to a message bus, including limitingsimultaneous connections to the message bus to the number of workersconcurrently executing the pipelines such that each worker commits tothe message bus using a single connection shared between batchesprocessed at the each worker. For some implementations of this method,the number of workers is 10, further including limiting simultaneousconnections to the message bus to 10.

In other implementations, the method can further include limitingconcurrent execution of the pipelines to a number of workers andmultiplexing the pipelines sequentially over the workers when a numberof pipelines exceeds the number of workers. In yet otherimplementations, the method can also include limiting simultaneousconnections to the common resource to the number of workers by providinga shared connection to a set of batches running on a same workerregardless of computation required to process the set.

In some implementations, the disclosed method, wherein the commonresource maintains a state, further includes providing a statelessshared connection to the common resource by externalizing informationabout the state. For this method, the information about the state can beexternalized at a key-value column store.

Some Particular Implementations

Some particular implementations and features are described in thefollowing discussion.

In one implementation, described is a method of maintaining throughputof a stream processing framework while increasing processing load. Themethod includes defining a container over at least one worker node thathas a plurality of workers, with one worker utilizing a whole processorcore within a worker node, and queuing data from one or more incomingnear real-time (NRT) data streams in multiple pipelines that run in thecontainer and have connections to at least one common resource externalto the container. The method also includes concurrently executing thepipelines at a number of workers as batches, and limiting simultaneousconnections between the common resource and the workers by providing ashared connection to a set of batches running on a same workerregardless of the pipelines to which the batches in the set belong.

In some implementations of a disclosed method, processed batches fromthe pipelines are committed to a message bus, including limitingsimultaneous connections to the message bus to the number of workersconcurrently executing the pipelines such that each worker commits tothe message bus using a single connection shared between batchesprocessed at the each worker. For some implementations of this method,the number of workers is 10, further including limiting simultaneousconnections to the message bus to 10.

In other implementations, the method can further include limitingconcurrent execution of the pipelines to a number of workers andmultiplexing the pipelines sequentially over the workers when a numberof pipelines exceeds the number of workers. In yet otherimplementations, the method can also include limiting simultaneousconnections to the common resource to the number of workers by providinga shared connection to a set of batches running on a same workerregardless of computation required to process the set.

In some implementations of the disclosed method, the common resourceexternal to the container maintains a state which includes providing astateless shared connection to the common resource by externalizinginformation about the state. For this method, the information about thestate can be externalized at a key-value column store.

Some implementations of the disclosed method include maintaining a stashof connections for each of the workers, wherein the stash includes aconfiguration component and an instance component. The method furtherincludes receiving a request from a first worker executing a firstpipeline to connect to at least one common resource external to thecontainer, wherein the request includes an access key. This method alsoincludes comparing the access key against a configuration component of acorresponding stash of the first worker, and responsive to a match,establishing a first connection between the first worker and the commonresource using an instance component of the corresponding stash; andlimiting simultaneous connections to the common resource by sharing thefirst connection across a plurality of pipelines executed by the firstworker. The configuration component can include a login and a password.

Other implementations may include a computer implemented system toperform any of the methods described above, the system including aprocessor, memory coupled to the processor, and computer instructionsloaded into the memory.

Yet another implementation may include a tangible computer readablestorage medium impressed with computer program instructions; theinstructions, when executed on a processor cause a computer to implementany of the methods described above.

The method described in this section and other sections of thetechnology disclosed can include one or more of the following featuresand/or features described in connection with additional methodsdisclosed. In the interest of conciseness, the combinations of featuresdisclosed in this application are not individually enumerated and arenot repeated with each base set of features. The reader will understandhow features identified in this method can readily be combined with setsof base features identified as implementations such as terminology,introduction, IoT platform and stream-batch processing framework, statemachine, data columnar, flowcharts, multi-tenant integration, someparticular implementations, etc.

A batch is defined on a time-slice basis and includes a portion of atleast one incoming NRT data stream most recently received within a timewindow, for some implementations. In others, a batch is defined on abatch-size basis and includes a data size constrained portion of atleast one incoming NRT data stream received most recently.

In one implementation, a method of managing resource allocation to tasksequences that have long tails includes operating a computing grid thatincludes machine resources, with heterogeneous containers defined overwhole machines and some containers including multiple machines. Themethod includes initially allocating multiple machines to a firstcontainer, initially allocating first set of stateful task sequences tothe first container, running the first set of stateful task sequences asmultiplexed units of work in the first container under control of acontainer-scheduler, where each unit of work for a first task sequenceruns to completion on first machine resources in the first container,unless it overruns a time-out, before a next unit of work for a secondtask sequence runs multiplexed on the first machine resources. Themethod further includes detecting that at least one long tail tasksequence is consuming measurably fewer resources than initiallyallocated, and responsive to the detecting, automatically allocating oneor more additional stateful task sequences to the first container ordeallocating one or more machines from the first container.

The disclosed method of managing resource allocation to task sequencesthat have long tails can also include detecting that excess machineresources are dedicated to the first set of task sequences, schedulingthe first set of task sequences over a first subset of machines in thefirst container to leave a second subset of machines in the firstcontainer unused, and automatically deallocating the second subset ofmachines from the first container.

In one implementation, the disclosed method further includes detectingthat excess machine resources are dedicated to the first set of tasksequences, and automatically allocating additional stateful tasksequences to the first container. The disclosed method can include anumber of task sequences running in the first container increasing from4 to 20.

In some implementations, a disclosed method of managing resourceallocation to surging task sequences includes operating a computing gridthat includes machine resources, with heterogeneous containers definedover whole machines and some containers including multiple machines. Themethod includes initially allocating multiple machines to a firstcontainer, initially allocating first set of stateful task sequences tothe first container, and running the first set of stateful tasksequences as multiplexed units of work in the first container undercontrol of a container-scheduler, where each unit of work for a firsttask sequence runs to completion on first machine resources in the firstcontainer, unless it overruns a time-out, before a next unit of work fora second task sequence runs multiplexed on the first machine resources.The method further includes detecting that at least one task sequence isrequiring measurably more resources than initially allocated,determining that the multiple machines allocated to the first containerhave not yet reached a predetermined maximum, and automaticallyallocating more machines to the first container or reallocating sometask sequences in the first set of task sequences from the firstcontainer to a second container. The disclosed method can furtherinclude detecting latency exceeding a predetermined threshold in runningthe first set of tasks sequences in the first container, automaticallyallocating additional machines to the first container, and schedulingunits of work for the first set of task sequences over the multiplemachines and the additional machines in the first container. The numberof machines in the first container can increase from 8 to 10. Thedisclosed method can also include detecting latency exceeding apredetermined threshold in running the first set of tasks sequences inthe first container, and determining that the multiple machinesallocated to the first container have reached a predetermined maximumand that no more machines will be allocated to the first set of tasksequences.

The disclosed method of managing resource allocation to surging tasksequences can also include, during running, persisting state informationof the first set of task sequences, detecting latency exceeding apredetermined threshold in running the first set of tasks sequences inthe first container, and automatically reallocating a second subset oftask sequences from the first container to a second container, whileleaving a first subset of task sequences allocated to the firstcontainer. The method further includes using the persisted stateinformation to initialize the second subset of task sequences in thesecond container, and scheduling units of work for the first subset oftask sequences in the first container and the second subset of tasksequences in the second container.

In one implementation, a method of managing resource allocation tofaulty task sequences includes initially allocating a first set ofstateful task sequences to a first container, receiving input from areplayable input source and triggering stateful first set of taskssequences to process the input, and running the first set of statefultask sequences as multiplexed units of work in the first container undercontrol of a container-scheduler, where each unit of work for a firsttask sequence runs to completion on first machine resources in the firstcontainer, unless it overruns a time-out, before a next unit of work fora second task sequence runs multiplexed on the first machine resources.The method further includes, during running, persisting stateinformation of the first set of task sequences, detecting runtime of aunit of work in a faulty task sequence exceeding a predetermined timeoutthreshold, and restarting the faulty task sequence by automaticallyreloading persisted state information of the faulty task sequence. Thismethod also includes automatically rewinding a replayable input to thefaulty task sequence to a point preceding the detecting and synchronizedwith the persisted state information for the faulty task sequence, andrerunning the faulty task sequence to completion of the unit of workwithout exceeding the predetermined timeout threshold.

The disclosed method of managing resource allocation to faulty tasksequences further includes reallocating the faulty task sequence fromthe first container to a second container, restarting the faulty tasksequence at the second container by reloading persisted stateinformation of the faulty task sequence at the second container,rewinding a replayable input to the faulty task sequence at the secondcontainer to a point preceding the detecting and synchronized with thepersisted state information for the faulty task sequence, and rerunningthe faulty task sequence to completion of the unit of work withoutexceeding the predetermined timeout threshold.

The terms and expressions employed herein are used as terms andexpressions of description and not of limitation, and there is nointention, in the use of such terms and expressions, of excluding anyequivalents of the features shown and described or portions thereof. Inaddition, having described certain implementations of the technologydisclosed, it will be apparent to those of ordinary skill in the artthat other implementations incorporating the concepts disclosed hereincan be used without departing from the spirit and scope of thetechnology disclosed. Accordingly, the described implementations are tobe considered in all respects as only illustrative and not restrictive.

What is claimed is:
 1. A method of maintaining throughput of a streamprocessing framework while increasing processing load, the methodincluding: defining a container over at least one worker node that has aplurality of workers, with one worker utilizing a whole processor corewithin a worker node; queuing data from one or more incoming nearreal-time (NRT) data streams into multiple pipelines that run in thecontainer and have connections to at least one common resource externalto the container; concurrently executing the pipelines at a number ofworkers as batches; and limiting simultaneous connections between thecommon resource and the workers by providing a shared connection used toprocess a set of batches running on a same worker regardless of thepipelines to which the batches in the set belong.
 2. The method of claim1, wherein processed batches from the pipelines are committed to amessage bus, further including: limiting simultaneous connections to themessage bus to the number of workers concurrently executing thepipelines such that each worker commits to the message bus using asingle connection shared between batches processed at each worker. 3.The method of claim 2, wherein the number of workers is 10, furtherincluding limiting simultaneous connections to the message bus to
 10. 4.The method of claim 1, further including: limiting concurrent executionof the pipelines to a number of workers and multiplexing the pipelinessequentially over the workers when a number of pipelines exceeds thenumber of the workers.
 5. The method of claim 1, further including:limiting simultaneous connections to the common resource to the numberof workers by providing a shared connection to a set of batches runningon a same worker regardless of computation required to process the set.6. The method of claim 1, wherein the common resource maintains a state,further including: providing a stateless shared connection to the commonresource by externalizing information about the state.
 7. The method ofclaim 6, wherein the information about the state is externalized at akey-value column store.
 8. The method of claim 1, further including:maintaining a stash of connections for each of the workers, wherein thestash includes a configuration component and an instance component;receiving a request from a first worker executing a first pipeline toconnect to at least one common resource external to the container,wherein the request includes an access key; comparing the access keyagainst a configuration component of a corresponding stash of the firstworker; responsive to a match, establishing a first connection betweenthe first worker and the common resource using an instance component ofthe corresponding stash; and limiting simultaneous connections to thecommon resource by sharing the first connection across a plurality ofpipelines executed by the first worker.
 9. The method of claim 8,wherein the configuration component includes a login and a password. 10.A system including one or more processors coupled to memory, the memoryloaded with computer instructions to maintain throughput of a streamprocessing framework while increasing processing load, the instructions,when executed on the processors, implement actions comprising: defininga container over at least one worker node that has a plurality ofworkers, with one worker utilizing a whole processor core within aworker node; queuing data from one or more incoming near real-time (NRT)data streams into multiple pipelines that run in the container and haveconnections to at least one common resource external to the container;concurrently executing the pipelines at a number of workers as batches;and limiting simultaneous connections between the common resource andthe workers by providing a shared connection used to process a set ofbatches running on a same worker regardless of the pipelines to whichthe batches in the set belong.
 11. The system of claim 10, whereinprocessed batches from the pipelines are committed to a message bus,further implementing actions comprising: limiting simultaneousconnections to the message bus to the number of workers concurrentlyexecuting the pipelines such that each worker commits to the message bususing a single connection shared between batches processed at eachworker.
 12. The system of claim 11, wherein the number of workers is 10,further implementing actions comprising limiting simultaneousconnections to the message bus to
 10. 13. The system of claim 10,further implementing actions comprising: limiting concurrent executionof the pipelines to a number of workers and multiplexing the pipelinessequentially over the workers when a number of pipelines exceeds thenumber of the workers.
 14. The system of claim 10, further implementingactions comprising: limiting simultaneous connections to the commonresource to the number of workers by providing a shared connection to aset of batches running on a same worker regardless of computationrequired to process the set.
 15. The system of claim 10, furtherimplementing actions comprising: maintaining a stash of connections foreach of the workers, wherein the stash includes a configurationcomponent and an instance component; receiving a request from a firstworker executing a first pipeline to connect to at least one commonresource external to the container, wherein the request includes anaccess key; comparing the access key against a configuration componentof a corresponding stash of the first worker; responsive to a match,establishing a first connection between the first worker and the commonresource using an instance component of the corresponding stash; andlimiting simultaneous connections to the common resource by sharing thefirst connection across a plurality of pipelines executed by the firstworker.
 16. The system of claim 15, wherein the configuration componentincludes a login and a password.
 17. A non-transitory computer readablestorage medium impressed with computer program instructions to maintainthroughput of a stream processing framework while increasing processingload, the instructions, when executed on a processor, implement a methodcomprising: defining a container over at least one worker node that hasa plurality of workers, with one worker utilizing a whole processor corewithin a worker node; queuing data from one or more incoming nearreal-time (NRT) data streams into multiple pipelines that run in thecontainer and have connections to at least one common resource externalto the container; concurrently executing the pipelines at a number ofworkers as batches; and limiting simultaneous connections between thecommon resource and the workers by providing a shared connection used toprocess a set of batches running on a same worker regardless of thepipelines to which the batches in the set belong.
 18. The non-transitorycomputer readable storage medium of claim 17, wherein processed batchesfrom the pipelines are committed to a message bus, implementing themethod further comprising: limiting simultaneous connections to themessage bus to the number of workers concurrently executing thepipelines such that each worker commits to the message bus using asingle connection shared between batches processed at each worker. 19.The non-transitory computer readable storage medium of claim 18, whereinthe number of workers is 10, implementing the method further comprisinglimiting simultaneous connections to the message bus to
 10. 20. Thenon-transitory computer readable storage medium of claim 17,implementing the method further comprising: maintaining a stash ofconnections for each of the workers, wherein the stash includes aconfiguration component and an instance component; receiving a requestfrom a first worker executing a first pipeline to connect to at leastone common resource external to the container, wherein the requestincludes an access key; comparing the access key against a configurationcomponent of a corresponding stash of the first worker; responsive to amatch, establishing a first connection between the first worker and thecommon resource using an instance component of the corresponding stash;and limiting simultaneous connections to the common resource by sharingthe first connection across a plurality of pipelines executed by thefirst worker.